Tuesday, December 11, 2007

How to create Event handler

How to create Event handler

Step 1

To create an event handler in your button web control, double click on your web Search control button. Then use the following codes to create a simple handler function to do it.

Note: You must change your TEXT INPUT to run as server control.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

txt.Value = "You have just click on Web contron button"

End Sub

When you click on Search, a text will appear in your HTML Input control.

Step 2

To run you Web Application, right click on your WebForm1.aspx and when your popup menu appear, click on Build and Browse.

No comments: