Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Validating entry in a textbox
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
ASP.NET
Database:
Visual FoxPro
Divers
Thread ID:
01026847
Message ID:
01026868
Vues:
25
>I have an ASP.NET page where entry in one of the text boxes have to be validated against a database. I put the validation code in the OnTextChanged method on the textbox. It works except if a user enters anything in the textbox and then immediately clicks on the Submit button. Then, the OnTextChanged method does not fire and entry is not validated.
>
>Any suggestions to why the OnTextChanged does not fire or what other method I could use for the job?
>
>Thank you for any suggestions.

Dmitry;

Use an Input Validation Control

For VB.NET
Sub cmdSubmit_Click(s As Object, e As EventArgs)
	If Page.IsValid Then
		Message.Text “Looks good!”
                ‘ Put your code here
	End If
End Sub
C#
Private void cmdSubmit_Click(object s, Systems.EventArgs e)
{
	if (Page.IsValid)
	{
		Message.Text “Looks good!”
		// Put your code here	
        }
}
Tom
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform