Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Post
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
0
Reply
How to test Session[] exists/!exists without error
Ron Robinson
Nov 7 2005 3:19 PM
1.6k
Reply
in a web app:
if
(Session["id"].ToString() == "")
{}
compiles ok but at run time generates:
[NullReferenceException: Object reference not set to an instance of an object.]
cart.cart.Page_Load(Object sender, EventArgs e) in c:\documents and settings\ron robinson\vswebcache\bubba.cartsppt.com\index.aspx.cs:61
Any ideas on how to avoid this?
Ron Robinson
[email protected]
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
Datagrid - adding a new row
Which .NET Control to use??