Master Page using Ajax in VB.NET

Master Page allow we to create a Layout for the page in our application.
  • 2911

Introduction : Master page allow we to create a Layout for the Page in our application. The single Master Page define a look and feel and standards behavior for particular page.

  • The Master Page extension is .master.
  • The Master Page is identified by a @master directive.

Step : 1 Open Visual Studio and go to File menu option.

  • Select Web Site option.
  • Select ASP.NET Web Site.

Step : 2 Go to Solution Explorer and right click.

  • Select Master Page option.
  • Go to Toolbox and drag and drop control.
  • Write a code.

Code :

<title>my master page</title>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        <asp:Calendar ID = "Calendar1" runat = "server"></asp:Calendar>
 <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">       

Step : 3 Go to Solution Explorer and right click.

  • Select Add New Items.
  • Select Web Form.
  • Drag and drop control in Toolbox.
  • Write a code.

Code :

script runat="server">
Protected Sub Button1_Click(sender As Object, e As System.EventArgs)
TextBox1.Text = DateAndTime.Now.Date.ToString()
asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            <asp:Button ID="Button1" runat="server" Text="Button"
                onclick="Button1_Click1" />

Step : 4 Now press F5 and run.



More Articles

© 2020 DotNetHeaven. All rights reserved.