emailbuilder88
04-08-2005, 07:05 PM
All,
Just trying to figure out some ASP on the fly and I am stumped. I am not entirely sure if this is .Net ASP or not, but figured this is a good place to start.
I am simply trying to fix a form input problem where a certain TextBox that usually contains integers can sometimes be empty. If empty, I would like to have my variable set to NULL if possible (assuming my DB will like that).
This is what I am attempting and the error follows:
<code>
Dim intDispOrder as Integer
If Trim(CType(e.Item.FindControl("txtDGDispOrder"),TextBox).Text) != "" Then
intDispOrder = (CType(e.Item.FindControl("txtDGDispOrder"),TextBox).Text)
End If
</code>
Compiler Error Message: BC30205: End of statement expected.
Can someone point me to the syntax problem? Any extra pointers about the actual code and if it will work are appreciated too!
TIA!
Just trying to figure out some ASP on the fly and I am stumped. I am not entirely sure if this is .Net ASP or not, but figured this is a good place to start.
I am simply trying to fix a form input problem where a certain TextBox that usually contains integers can sometimes be empty. If empty, I would like to have my variable set to NULL if possible (assuming my DB will like that).
This is what I am attempting and the error follows:
<code>
Dim intDispOrder as Integer
If Trim(CType(e.Item.FindControl("txtDGDispOrder"),TextBox).Text) != "" Then
intDispOrder = (CType(e.Item.FindControl("txtDGDispOrder"),TextBox).Text)
End If
</code>
Compiler Error Message: BC30205: End of statement expected.
Can someone point me to the syntax problem? Any extra pointers about the actual code and if it will work are appreciated too!
TIA!