program to
add values entered by user.
-----------------------------------------DESIGN-----------------------------------------------------
<!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"><head>
<metahttp-equiv="content-type"content="text/html;
charset=UTF-8"><title>
Untitled Page
</title></head>
<body>
<pstyle="height: 14px"></p><h1>
Addition Of Two Number</h1>
<p></p>
<formname="form1"method="post"action="Default.aspx"id="form1">
<div>
<inputname="__VIEWSTATE"id="__VIEWSTATE"value="/wEPDwUJNDY3NjE1NjMyZGTnbpTbuWNrPlbolrbr+Pc8w+sAnw=="type="hidden">
</div>
<pstyle="height: 27px">
Enter First No. <inputname="TextBox1"value=""id="TextBox1"type="text"><br/></p>
<br/><pstyle="height: 27px">
Enter Second No. <inputname="TextBox2"value=""id="TextBox2"type="text">
</p>
<pstyle="height: 27px; margin-left: 80px;">
<inputname="Button1"value="ok"id="Button1"type="submit">
</p>
<div>
<pstyle="height: 27px">
Ans is .
<inputname="TextBox3"value=""id="TextBox3"type="text"></p>
</div>
<div>
<inputname="__EVENTVALIDATION"id="__EVENTVALIDATION"value="/wEWBQKa3uWhDgLs0bLrBgLs0fbZDAKM54rGBgLs0Yq1BVCNXtARwODTgNQnHDkZp0RSfqmp"type="hidden">
</div>
</form>
-----------------------------------------code---------------------------------------------------------
PartialClass _Default
Inherits
System.Web.UI.Page
ProtectedSub Button1_Click(ByVal sender AsObject,
ByVal e As
System.EventArgs) Handles Button1.Click
Dim a, b AsInteger
a = TextBox1.Text
b = TextBox2.Text
TextBox3.Text = a + b
EndSub
EndClass-----------------------------------------output----------------------------------------------------
codestrew |
No comments:
Post a Comment