1 csharp code <%@ Page Language="C#" %>
3 html code <script runat="server">
4 csharp code void Button1_Click(object sender, System.EventArgs e)
6 csharp code Label1.Text = ("Welcome, " + TextBox1.Text);
9 html code <head runat="server">
10 html code <title>Basic ASP.NET Web Page</title>
13 csharp code <%if( ViewData["Message"] != null ){ %>
14 csharp code <h3 style="color:Red"><%=ViewData["Message"]%></h3><br />
16 html code <form id="form1" runat="server">
17 html code <h1>Welcome to ASP.NET</h1>
18 html code <p>Type your name and click the button.</p>
20 html code <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
21 html code <asp:Button ID="Button1" runat="server"
22 html code Text="Click" OnClick="Button1_Click" />
25 html code <asp:Label ID="Label1" runat="server"></asp:Label>