web 2.0

ASP.NET(vb.net) & Event Handlers

ASP.NET(vb.net) & Event Handler - How to create event handler in asp.net web server control.

ShotDev Focus:
- ASP.NET & Create Event Handler.

Example

1. Create event under tag control.

<%@ Page Language="VB" %>
<script runat="server">
Sub Button1_OnClick(sender as Object, e As EventArgs)
................
End Sub
</script>
<form runat="server">
<asp:Button id="Button1" onclick="Button1_OnClick" runat="server" Text="Button"></asp:Button>
</form>

.

2. Create event under sub and event handles.

<%@ Page Language="VB" %>
Sub Button1OnClick(sender as Object, e As EventArgs) Handles Button1.Click

End Sub
</script>
<form runat="server">
<asp:Button id="Button1" runat="server" Text="Button"></asp:Button>
</form>

.
.
.

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.