PROGRAM IN ASP.NET (VB)-USAGE OF LINK BUTTON CONTROL

 ASPX FILE

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication5.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

    <title></title>

</head>

<body>

    <form id="form1" runat="server">

        <div>

            <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="linkbutton1_click">LINK !!!!!!!</asp:LinkButton>

        </div>

        <p>

            &nbsp;</p>

        <p>

            &nbsp;</p>

        <p>

            &nbsp;</p>

        <p>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

            <asp:Label ID="Label1" runat="server" BackColor="Red" ForeColor="#CCFF99" Width="500px"></asp:Label>

        </p>

    </form>

</body>

</html>

ASPX.VB FILE

Public Class WebForm1

    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub LinkButton1_Click(sender As Object, e As EventArgs) Handles LinkButton1.Click

        Label1.Text = "WELCOME!!!!!!!"

    End Sub

End Class

OUTPUT:








No comments:

Post a Comment