web 2.0

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

ASP.NET(vb.net) & LinkButton - asp:LinkButton - asp:LinkButton : Creates a hyperlink-style button on a Web Forms page.

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

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

Tag Control :

<asp:LinkButton id="LinkButton1"
Text="label"
Command="Command"
CommandArgument="CommandArgument"
CausesValidation="true | false"
OnClick="OnClickMethod"
runat="server"/>
or
<asp:LinkButton id="LinkButton1"
Command="Command"
CommandArgument="CommandArgument"
CausesValidation="true | false"
OnClick="OnClickMethod"
runat="server"/>
Text
</asp:LinkButton>

Example

LinkButton.aspx

<%@ Page Language="VB" %>
<script runat="server">
Sub LinkButton1_Click(sender As Object, e As EventArgs)
Me.lblText1.Text = Me.TextBox1.Text
Me.lblText2.Text = Me.TextBox2.Text
End Sub

Sub LinkButton2_Click(sender As Object, e As EventArgs) Handles LinkButton2.Click
Me.lblText1.Text = Now & " - " &Me.TextBox1.Text
Me.lblText2.Text = Now & " - " &Me.TextBox2.Text
End Sub
</script>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<form runat="server">
<asp:TextBox id="TextBox1" runat="server"></asp:TextBox>
<br />
<asp:TextBox id="TextBox2" runat="server"></asp:TextBox>
<asp:LinkButton id="LinkButton1" onclick="LinkButton1_Click" runat="server">Submit 1</asp:LinkButton>
&nbsp;
<asp:LinkButton id="LinkButton2" runat="server">Submit 2</asp:LinkButton>
<hr />
<asp:Label id="lblText1" runat="server"></asp:Label>
<br />
<asp:Label id="lblText2" runat="server"></asp:Label>
</form>
</body>
</html>

Screenshot

ASP.NET(vb.net) & LinkButton - asp:LinkButton
.
.
.
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.