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

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top