program to fill your personal information and display it.
-----------------------------------------DESIGN-----------------------------------------------------
<%@PageLanguage="VB"AutoEventWireup="false"CodeFile="Default.aspx.vb"Inherits="_Default"%>
<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<headrunat="server">
<title>Untitled Page</title>
</head>
<body>
<formid="form1"runat="server">
<spanlang="en-us"> </span>
<divalign="center"><fontcolor="purple"size="+3">personal details</font>
<divalign="left"style="margin-left:550px">
<p>
<asp:LabelID="Label1"runat="server"Text=" first name"></asp:Label>
<spanlang="en-us"> </span>
<asp:TextBoxID="TextBox1"runat="server"Height="22px"></asp:TextBox>
</p>
<asp:LabelID="Label2"runat="server"Text="last name"></asp:Label>
<spanlang="en-us"> </span>
<asp:TextBoxID="TextBox2"runat="server"></asp:TextBox>
<br/>
<br/>
<asp:LabelID="Label3"runat="server"Text="Gender"></asp:Label>
<spanlang="en-us"> </span>
<asp:RadioButtonID="RadioButton1"GroupName="g"runat="server"Text="male"/>
<spanlang="en-us"> </span>
<asp:RadioButtonID="RadioButton2"GroupName="g"runat="server"Text="female"/>
<br/>
<br/>
<asp:LabelID="Label4"runat="server"Text="semester"></asp:Label>
<spanlang="en-us"> </span>
<spanlang="en-us">
<asp:DropDownListID="DropDownList1"runat="server">
<asp:ListItem>Select Sem</asp:ListItem>
<asp:ListItem>2nd</asp:ListItem>
<asp:ListItem>4th</asp:ListItem>
<asp:ListItem>6th</asp:ListItem>
</asp:DropDownList>
<br/>
<br/>
</span>
<asp:LabelID="Label5"runat="server"Text="Branch"></asp:Label>
<spanlang="en-us">
<asp:DropDownListID="DropDownList2"runat="server">
<asp:ListItem>Select Branch</asp:ListItem>
<asp:ListItem>IT</asp:ListItem>
<asp:ListItem>Comp</asp:ListItem>
<asp:ListItem>Civil</asp:ListItem>
<asp:ListItem>EC</asp:ListItem>
<asp:ListItem>Mech</asp:ListItem>
</asp:DropDownList>
<br/>
</span>
<br/>
<asp:LabelID="Label6"runat="server"Text="password"></asp:Label>
<spanlang="en-us"> </span>
<asp:TextBoxID="TextBox3"runat="server"TextMode="Password"></asp:TextBox>
<br/>
<asp:LabelID="Label7"runat="server"Text="Address"></asp:Label>
<spanlang="en-us"> </span>
<asp:TextBoxID="TextBox4"runat="server"Height="82px"TextMode="MultiLine"
Width="175px"></asp:TextBox>
<br/>
<br/>
<br/>
<spanlang="en-us"> </span>
<asp:ButtonID="Button1"runat="server"Text="Display data"/>
<spanlang="en-us"> </span>
<inputtype="reset"value=" clear"/>
<br/>
<br/>
<asp:TextBoxID="TextBox5"runat="server"Height="277px"Width="578px"
TextMode="MultiLine"></asp:TextBox>
</div>
</div>
</form>
</body>
</html>
-----------------------------------------code---------------------------------------------------------
PartialClass _Default
Inherits System.Web.UI.Page
ProtectedSub Button1_Click(ByVal sender AsObject, ByVal e As System.EventArgs) Handles Button1.Click
Dim a AsString
If RadioButton1.Checked = TrueThen
a = "Male"
Else
a = "Female"
EndIf
TextBox5.Text = "First Name:="& TextBox1.Text & vbCrLf &"Last Name:="& TextBox2.Text & vbCrLf &"Gender:="& a & vbCrLf &"Semester:="& DropDownList1.SelectedItem.ToString() & vbCrLf &"Branch:="& DropDownList2.SelectedItem.ToString() & vbCrLf &"Password:="& TextBox3.Text & vbCrLf &"Address:="& TextBox4.Text
EndSub
EndClass
-----------------------------------------output----------------------------------------------------
codestrew |
No comments:
Post a Comment