code for calling a button event (click) ? (asp.net 2)

M

moi

Hello,
i would like a sample code to call a button click with the event
"textchanged" of a textbox.
I just would like to valide a textbox with the textchanged event and not to
click on the submit button ...
Thanks for your sample ..

Bye !
 
S

Sonu Kapoor [MVP]

Double click the textbox in designer, which will create the following event in your codebehind:

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

' Add your validation here

End Sub

I assume you are already aware of the client side validation controls?


Sonu Kapoor - [MVP]
W: http://www.DotNetSlackers.com
B: http://www.Kapoorsolutions.com/blog/
 
G

Guest

Moi,
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles TextBox1.TextChanged
button1_click(sender,e)
End Sub

Good Luck
DWS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top