Institute Management System Project in ASP.NET C# |Tutorial in HINDI | Part-02
watch part 2 video
Step-2: Create a webpage give name "Registration.aspx" & write following code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Registration.aspx.cs" Inherits="Registration" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Registration Form</title>
</head>
<body>
<script type="text/javascript">
setInterval("RecordStatus();", 1000);
function RecordStatus() {
msg = document.getElementById("lblStatus");
if (msg.style.color == "#7c2bc6") {
msg.style.color = "#FF0080";
//alert("if case........");
}
else {
msg.style.color = "#7c2bc6";
//alert("else case........");
}
}
</script>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Panel ID="Panel4" runat="server" Font-Names="Verdana" ForeColor="#007D3F">
Status :
<asp:Label ID="lblStatus" runat="server" Text="Label"></asp:Label>
</asp:Panel>
<table align="center" class="style10" style="background-image: url('Images/Background.bmp')">
<tr>
<td align="center">
<table class="style10">
<tr>
<td align="center">
<asp:MultiView ID="MultiView1" runat="server">
<asp:View ID="View2" runat="server">
<asp:Panel ID="Panel1" runat="server">
<table class="style10">
<tr>
<td align="right" colspan="2" style="color: #FF0000">
<hr />
* Stands For Mandatory Fields<hr />
</td>
</tr>
<tr>
<td align="right">
* Login ID :
</td>
<td align="left">
<asp:TextBox ID="txtLogin_id" runat="server" Font-Names="Verdana"
ForeColor="#003300"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtLogin_id"
ErrorMessage="*"></asp:RequiredFieldValidator>
<cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="txtLogin_id"
WatermarkText="Enter Login ID"></cc1:TextBoxWatermarkExtender>
</td>
</tr>
<tr>
<td align="right">
* Password :
</td>
<td align="left">
<asp:TextBox ID="txtPassword" runat="server" TextMode="Password"
Font-Names="Verdana"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtPassword"
ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
*Name :
</td>
<td align="left">
<asp:TextBox ID="txtName" runat="server" Font-Names="Verdana"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtName"
ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
Address :
</td>
<td align="left">
<asp:TextBox ID="txtAddress" runat="server" TextMode="MultiLine"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
Phone Number :
</td>
<td align="left">
<asp:TextBox ID="txtPhone" runat="server" Font-Names="Verdana"></asp:TextBox>
<cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server"
TargetControlID="txtPhone" ValidChars="-" FilterType="Custom, Numbers"></cc1:FilteredTextBoxExtender>
</td>
</tr>
<tr>
<td align="right">
*Email ID :
</td>
<td align="left">
<asp:TextBox ID="txtEmail" runat="server" Font-Names="Verdana"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtEmail"
ErrorMessage="*"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail"
ErrorMessage="@" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td align="right">
Owner :
</td>
<td align="left">
<asp:TextBox ID="txtOwner" runat="server" Font-Names="Verdana"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
* Forgot Question :
</td>
<td align="left">
<asp:DropDownList ID="ddlQuestion" runat="server" Font-Names="Verdana">
<asp:ListItem Value="GAME">Favourite Game</asp:ListItem>
<asp:ListItem Value="PHONE">First Phone Number</asp:ListItem>
<asp:ListItem Value="COLOR">Favourite Color</asp:ListItem>
<asp:ListItem Value="NICK">Nick Name</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td align="right">
* Answer :
</td>
<td align="left">
<asp:TextBox ID="txtAnswer" runat="server" Font-Names="Verdana"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtAnswer"
ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
Remarks :
</td>
<td align="left">
<asp:TextBox ID="txtRemarks" runat="server" TextMode="MultiLine"></asp:TextBox>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<hr />
<asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click"
Text="Submit" Height="28px" Width="74px" />
<asp:Button ID="btnCancel" runat="server" CausesValidation="False" OnClick="btnCancel_Click"
Text="Cancel" Height="28px" Width="74px" />
<hr />
</td>
</tr>
</table>
</asp:Panel>
</asp:View>
</asp:MultiView>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
.....................................................
Output:
Registration form designStep3: Download BIN folder
Bin Folder click here
Watch video part-1
|
No comments:
Post a Comment