B
Bob
Hi,
I 'm starting asp.net and i saw two ways to make buttons. Which way to use?
Are the htmlbuttons in specific case better than webbuttons? Are there
advantages?
Thanks
Bob
htmlbutton:
<script runat="server">
Sub button1(Source As Object, e As EventArgs)
p1.InnerHtml="You clicked the blue button!"
End Sub
</script>
<form runat="server">
<button id="b1" OnServerClick="button1" runat="server">htmlbutton</button>
<p id="p1" runat="server" />
</form>
and webcontrol button.
<script runat="server">
Sub submit(Source As Object, e As EventArgs)
button1.Text="You clicked me!"
End Sub
</script>
<form runat="server">
<asp:Button id="button1" Text="Click me!" runat="server" OnClick="submit"/>
</form>
I 'm starting asp.net and i saw two ways to make buttons. Which way to use?
Are the htmlbuttons in specific case better than webbuttons? Are there
advantages?
Thanks
Bob
htmlbutton:
<script runat="server">
Sub button1(Source As Object, e As EventArgs)
p1.InnerHtml="You clicked the blue button!"
End Sub
</script>
<form runat="server">
<button id="b1" OnServerClick="button1" runat="server">htmlbutton</button>
<p id="p1" runat="server" />
</form>
and webcontrol button.
<script runat="server">
Sub submit(Source As Object, e As EventArgs)
button1.Text="You clicked me!"
End Sub
</script>
<form runat="server">
<asp:Button id="button1" Text="Click me!" runat="server" OnClick="submit"/>
</form>