G
gn
I am a VB.Net newbie and have tried to search for this answer without
success - What is the exact syntax to test if
HttpContext.Current.Application("var") exists in vb.net
I have tried:
If (HttpContext.Current.Application("var").ToString) <> "" Then
That gives me System.NullReferenceException: Object reference not set
to an instance of an object Error, I suspect because I am trying to
convert nothing into a string??
If HttpContext.Current.Application("var") is null then
Didn't like that either, syntax checker said I should use system.DBnull
since 'null' is no longer supported??
I am sure I am missing something very simple, could someone please give
me a nudge in the right direction?
Thanks
success - What is the exact syntax to test if
HttpContext.Current.Application("var") exists in vb.net
I have tried:
If (HttpContext.Current.Application("var").ToString) <> "" Then
That gives me System.NullReferenceException: Object reference not set
to an instance of an object Error, I suspect because I am trying to
convert nothing into a string??
If HttpContext.Current.Application("var") is null then
Didn't like that either, syntax checker said I should use system.DBnull
since 'null' is no longer supported??
I am sure I am missing something very simple, could someone please give
me a nudge in the right direction?
Thanks