legendgod Posted June 14, 2004 Posted June 14, 2004 Hi guys, thank you for reading. I have a page which have a function to request.querystring("sth") the previous page's form. However, due to the program logic, sometimes the previous page do not give out any querystring. Therefore, if I go on the request.querystring("sth"), a nullreference error occur. Is there any method to know request.querystring("sth") is null or not? Also, the same problem also occur for the session. I don't know if there are any method to know Session("sth") is null or not. Thanks. Quote http://blog.legendgod.com
wessamzeidan Posted June 14, 2004 Posted June 14, 2004 I always use If Request.QueryString("myvar")<>"" Then '''code End If works for session variables too Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
legendgod Posted June 14, 2004 Author Posted June 14, 2004 Thanks for your suggestion. It is easier than I think. =D Quote http://blog.legendgod.com
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.