this is for HTML control event at client side script function
just copy the below code in source page of ur asp.net application
<html xmlns="http://www.w3.org/1999/xhtml" >
<script language="VB" runat="server">
Sub FancyBtn_Click(Source As Object, E as EventArgs)
Message.InnerHtml = "Your name is: " & Name.Value
End Sub
</script>
<head runat="server">
<title> Enter Name: </title>
</head>
<body>
<form id="form1" method="post" runat="server">
<h3> Enter Name: <input id="Name" type="text" size="40" runat="server" />
</h3>
<button onserverclick=" FancyBtn_Click" runat="server">
<b><i> I'm a fancy HTML 4.0 button </i> </b>
</button>
<h1>
<span id="Message" runat="server"></span>
</h1>
</form>
</body>
</html>
---------------------------------------------------------
this is for HTML control event at server side code behind function
just copy the below code in view code of ur asp.net application
Sub FancyBtn_Click(Source As Object, E as EventArgs)
Message.InnerHtml = "Your name is: " & Name.Value
End Sub
but comment the below code in htmlsource view
/*<script language="VB" runat="server">
Sub FancyBtn_Click(Source As Object, E as EventArgs)
Message.InnerHtml = "Your name is: " & Name.Value
End Sub
</script>*/
just copy the below code in source page of ur asp.net application
<html xmlns="http://www.w3.org/1999/xhtml" >
<script language="VB" runat="server">
Sub FancyBtn_Click(Source As Object, E as EventArgs)
Message.InnerHtml = "Your name is: " & Name.Value
End Sub
</script>
<head runat="server">
<title> Enter Name: </title>
</head>
<body>
<form id="form1" method="post" runat="server">
<h3> Enter Name: <input id="Name" type="text" size="40" runat="server" />
</h3>
<button onserverclick=" FancyBtn_Click" runat="server">
<b><i> I'm a fancy HTML 4.0 button </i> </b>
</button>
<h1>
<span id="Message" runat="server"></span>
</h1>
</form>
</body>
</html>
---------------------------------------------------------
this is for HTML control event at server side code behind function
just copy the below code in view code of ur asp.net application
Sub FancyBtn_Click(Source As Object, E as EventArgs)
Message.InnerHtml = "Your name is: " & Name.Value
End Sub
but comment the below code in htmlsource view
/*<script language="VB" runat="server">
Sub FancyBtn_Click(Source As Object, E as EventArgs)
Message.InnerHtml = "Your name is: " & Name.Value
End Sub
</script>*/



