0% found this document useful (0 votes)
30 views1 page

3 Tier Source Code

The document contains ASP.NET server controls for a form that includes text boxes for employee name and salary, along with validation controls to ensure the fields are filled out correctly. RequiredFieldValidators and RegularExpressionValidators are used to enforce input rules for the employee name and salary, while a DropDownList is provided for department selection with its own validation. A submit button is included to trigger the form submission, and a label is available for displaying messages.

Uploaded by

hemangi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views1 page

3 Tier Source Code

The document contains ASP.NET server controls for a form that includes text boxes for employee name and salary, along with validation controls to ensure the fields are filled out correctly. RequiredFieldValidators and RegularExpressionValidators are used to enforce input rules for the employee name and salary, while a DropDownList is provided for department selection with its own validation. A submit button is included to trigger the form submission, and a label is available for displaying messages.

Uploaded by

hemangi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

<asp:TextBox ID="txtEname" runat="server"></asp:TextBox>

<asp:RequiredFieldValidator ID="rfvEname" runat="server"


ControlToValidate="txtEname" ValidationGroup="Submit" di
rection="Dynamic"
ErrorMessage="Please Enter Empname"></asp:RequiredField
Validator>
<asp:RegularExpressionValidator ID="revEname"
runat="server" direction="dynamic" ControlToValidate="tx
tEname" ValidationGroup="Submit"
ErrorMessage="Please enter valid Empname"
ValidationExpression="^[a-zA-Z]{3,20}$" ></asp:RegularEx
pressionValidator>
<asp:TextBox ID="txtBasicSal" runat="server" Width="76px"></asp:TextBox> &n
bsp;
<asp:RequiredFieldValidator
ID="rfvBasicSal" ValidationGroup="Submit" direction="Dy
namic"
runat="server" ControlToValidate="txtBasicSal"
ErrorMessage="Please Enter EmpSalary" ></asp:RequiredFie
ldValidator>
<asp:RegularExpressionValidator
ID="revBasicSal"
runat="server" direction="dynamic" ControlToValidate="tx
tBasicSal"
ValidationGroup="Submit"
ErrorMessage="Please enter valid EmpSalary"
ValidationExpression="^[0-9]{3,20}$" ></asp:RegularExpre
ssionValidator>

<asp:DropDownList ID="DropDeptNameList" runat="server">


</asp:DropDownList>
<asp:RequiredFieldValidator
ID="rfvDeptname" ValidationGroup="Submit" direction="D
ynamic"
runat="server" ControlToValidate="DropDeptNameList"
ErrorMessage="Please Select valid Deptname"
InitialValue="0"></asp:RequiredFieldValidator>

class="auto-style2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnCl
ick="btnSubmit_Click" />

<asp:Label ID="lblMsg" runat="server" ></asp:Label>

You might also like