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>*/
24 comments:
thank you mam.so kind of you.
It is very useful Mam
this code is very useful to us ...
i have done this mam
i got the output mam!
i got result mam
i got output mam
by, angel
we have got the o/p successfully mam.thank you mam.
Thanks for the code mam.IT is working.
i executed this mam!!!
Can u give me a detailed explanation on the script tag mam......
It's very useful.Thank you mam!
i have done it
I tried this program.and i got the output mam.
Mam,I've Worked on this Code.Your Blog is very useful to workout....
i got d output mam.
i got output mam!!!Thank you mam its very useful to us!!!
thank u mam
i have done it
i hav done this program. its working mam...
The Script tag can be teach on later on classes in detail.....
Thanks for all of ur comments
Your Queries are most welcome.........
I too tried ..was very useful..
Tq so much Mam... :)
Post a Comment