Is IsNull supported in ASP.NET?

  • Thread starter Thread starter D. Shane Fowlkes
  • Start date Start date
D

D. Shane Fowlkes

For some reason, I'm being told to declare "IsNull". Surely I'm doing
something wrong. I'm basically seeing if someone clicked a link which
passes a variable in the querystring like MyPage.aspx?id=5

This is in a Page_Load rountine:

If IsNull(Request.QueryString("id")) Then
intID = CInt(Request.QueryString("id"))
lblEventDetails.Text = "You clicked event number " & intID & "."
End If


Compiler Error Message: BC30451: Name 'IsNull' is not declared.
 
There is no built-in VB.Net function called "IsNull" - use IsNothing().

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
If you're checking the result of a SQL query, you can use IsDBNULL. This
only works on database fields.

Chip
 
Thanks guys.



Kevin Spencer said:
There is no built-in VB.Net function called "IsNull" - use IsNothing().

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Back
Top