0

all I need to do is have a control that a user keys in a code that is validated against the sql table and brings back the associated web page for that code.
does anyone know how to do this in Visual Studio 2003

3
Contributors
4
Replies
5
Views
13 Years
Discussion Span
Last Post by w412
0

Thanks, but I think I did not describe my problem well enough. I have a textbox that will receive a code i.e. n123, x321 etc.. when the user clicks the submit button I need it to go to the sql table find the code if it exists and bring it back or give a error message if it does not exist.

0

Isn't that a simple if statement? If ya need some help:

Dim valid as Boolean
 'code would go here to open the db connection, and retrieve 
 'the value that you need, setting valid to true if the textbox is valid
 If valid Then
 	  'do what you want if its valid
 Else
 	  ' You could use the errorprovider control to show that there was an error,
 	  ' you could make the text box red, or anything you want to do; a simple 
 	  ' MessageBox is illustrated below.
 	  MessageBox.Show("You entered a invalid data")
 End If
0

all I need to do is have a control that a user keys in a code that is validated against the sql table and brings back the associated web page for that code.
does anyone know how to do this in Visual Studio 2003

if x>0 then
isnumeric(y)=true
else
msgbox("invalid data")

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.