program to make a square of given number.
-----------------------------------------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">
<h1>square of no</h1><br/>
Enter No.<asp:TextBoxID="TextBox1"runat="server"></asp:TextBox>
<br/>
<asp:ButtonID="Button1"runat="server"Text="ok"/>
<br/>
Ans <asp:TextBoxID="TextBox2"runat="server"style="margin-bottom: 9px"></asp:TextBox>
</form>
</body>-
</html>
-----------------------------------------code---------------------------------------------------------
PartialClass _Default
Inherits System.Web.UI.Page
Dim a AsInteger
ProtectedSub Button1_Click(ByVal sender AsObject, ByVal e As System.EventArgs) Handles Button1.Click
a = TextBox1.Text
TextBox2.Text = a * a
EndSub
EndClass-----------------------------------------output----------------------------------------------------
codestrew |