Is IsNull supported in ASP.NET?

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.
 
K

Kevin Spencer

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.
 
C

Chip

If you're checking the result of a SQL query, you can use IsDBNULL. This
only works on database fields.

Chip
 
D

D. Shane Fowlkes

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top