web 2.0

ASP.NET(vb.net) & Button - asp:Button

ASP.NET(vb.net) & Button - asp:Button - asp:Buttor : Displays a push button control on the Web Forms page.

ShotDev Focus:
- ASP.NET(vb.net) & Button - asp:Button

ASP.NET(vb.net) & Button - asp:Button

Tag Control :

<asp:Button id="MyButton"
Text="label"
CommandName="command"
CommandArgument="commandargument"
CausesValidation="true | false"
OnClick="OnClickMethod"
runat="server"/>

Example

Button.aspx

<%@ Page Language="VB" %>
<script runat="server">

Sub Button1_OnClick(sender as Object, e As EventArgs)
Me.lblText.Text = "Welcome To [" & Me.txtName.Text & "] ShotDev.Com"
End Sub
'*** Or ***'
'Sub Button1OnClick(sender as Object, e As EventArgs) Handles Button1.Click
'Me.lblText.Text = "Welcome To [" & Me.txtName.Text & "] ShotDev.Com"
'End Sub

</script>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<form runat="server">
<asp:Label id="lblTopic" runat="server" text="Enter Your Name : "></asp:Label>
<asp:TextBox id="txtName" runat="server"></asp:TextBox>
<asp:Button id="Button1" onclick="Button1_OnClick" runat="server" Text="Button"></asp:Button>
<br />
<br />
<asp:Label id="lblText" runat="server"></asp:Label>
</form>
</body>
</html>

Screenshot

ASP.NET(vb.net) & Button - asp:Button
.
.
.
Download this script.
Download

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.