DEFAULT.ASPX FILE:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label2" runat="server" Text="Name" Width="110px"></asp:Label>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox2"
ErrorMessage='"Enter your name"'></asp:RequiredFieldValidator><br />
<asp:Label ID="Label3" runat="server" Text="Emp_id" Width="111px"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox1"
ErrorMessage='"Enter your emp_id"'></asp:RequiredFieldValidator><br />
<asp:Label ID="Label4" runat="server" Width="106px">Password</asp:Label>
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox3"
ErrorMessage='"Enter your Password"'></asp:RequiredFieldValidator><br />
<br />
<asp:Button ID="Button1" runat="server" Text="VALIDATE" /><br />
<br />
<asp:Label ID="Label1" runat="server" Width="201px"></asp:Label></div>
</form>
</body>
</html>
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label2" runat="server" Text="Name" Width="110px"></asp:Label>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox2"
ErrorMessage='"Enter your name"'></asp:RequiredFieldValidator><br />
<asp:Label ID="Label3" runat="server" Text="Emp_id" Width="111px"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox1"
ErrorMessage='"Enter your emp_id"'></asp:RequiredFieldValidator><br />
<asp:Label ID="Label4" runat="server" Width="106px">Password</asp:Label>
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox3"
ErrorMessage='"Enter your Password"'></asp:RequiredFieldValidator><br />
<br />
<asp:Button ID="Button1" runat="server" Text="VALIDATE" /><br />
<br />
<asp:Label ID="Label1" runat="server" Width="201px"></asp:Label></div>
</form>
</body>
</html>
DEFAULT.ASPX.VB FILE:
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Label1.Text = TextBox1.Text + " " + TextBox2.Text + " " + TextBox3.Text
End Sub
End Class
No comments:
Post a Comment