Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check for Null 1

Status
Not open for further replies.

chuckh70

Programmer
Feb 4, 2004
71
US
Just trying to do something simple.

Basically I want to check and is if my select box value is null, and set it too *

Code:
If MySelect.Value Is Null then
MySelect.Value = *

how do you do this in .Net I know Null is no longer valid?
 
It's not a check box so it doesn't actually get checked does it?

I'll give it a shot thanks.
 
Ok that didn't error out, but it's not firing off the next part?

I tried

Code:
if MySelect.Value Is System.DBNull.Value Then
Response.Write("It's About Time")
End if

But I get nothing... am I missing something?
 
Ok I get it to do the response.write

but what I need to do now is set the value to * if the condition is met

is it

Code:
MySelect.Value = MySelect.Value=("*")

this does not seem to work.. doesn't crash but I get no value... any idea's?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top