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

Check out the ErrorProvider control out ;-).

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.

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

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")

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.