1)Declare array with five elements
a[]={8,4,6,2,1,10}
Print minimum and maximum no from array.
2)Accept values from Textbox and add into Listbox on click
ok button.
2)Accept these values store them in cookie collection and
show them in next form.
Assignment 3 20Marks
1) Display EmpId ,EmpName ,EmpSal usind datagrid view
(use sqlerver 2005)
2) Insert Item Id, Item Name, Qty, Rate using ado.net(use
sqlerver 2005)
Answer Posted / shivprasad (9270595151)
2) Accept 2 no's from user & uning while loop calculate A^B
ans :
<%@ Page Language="VB" %>
<script runat ="server">
Sub Clear_Text(ByVal Source As Object, ByVal e As
EventArgs)
Text1.Text = ""
Text2.Text = ""
End Sub
Sub Calculate(ByVal Source As Object, ByVal e As
EventArgs)
Dim num1 As Integer
Dim num2 As Integer
num1 = CInt(Val(Text1.Text))
num2 = CInt(Val(Text2.Text))
Dim result As Long = 1
While num2 > 0
result *= num1
num2 -= 1
End While
MsgBox("The Value of A ^ B Is " & result)
End Sub
</script>
<html>
<head>
<title>Untitled Page</title>
</head>
<body bgcolor="aqua">
<form id="form1" runat="server">
<asp:Label ID="Label1" Text ="Enter No A :"
runat="server"/>
<asp:TextBox ID="Text1" runat="server"/>
<asp:RequiredFieldValidator ID ="R1" ControlToValidate
= "Text1" Text = "Enter The Number" runat = "server" />
<br/>
<asp:Label ID="Label2" Text ="Enter No B :"
runat="server"/>
<asp:TextBox ID="Text2" runat="server"/>
<asp:RequiredFieldValidator ID ="R2" ControlToValidate
= "Text2" Text = "Enter The Number" runat = "server" />
<br/><br/><br/>
<asp:Button ID = "ok" Text = "OK" OnClick = "Calculate"
runat ="server"/>
<asp:Button ID = "clear" Text = "Clear" OnClick
= "Clear_Text" runat ="server"/>
</form>
</body>
</html>
| Is This Answer Correct ? | 10 Yes | 2 No |
Post New Answer View All Answers
How does non-deterministic garbage collection affect my code?
What is the difference between the value-type variables and reference-type variables
Define application object in asp?
Define a variable in asp?
hello dear this quadir saif and im doing bca .i want hotel management project in asp.net (with backend sql).on my id (quadir2011@rediffmail.com)
Explain the tasks performed by <> tags?
Juxtapose the HTTP verbs GET and POST. What is HEAD?
Define a "virtual directory"?
why did u choose tech support as ur careears
define the functionality of web server in context to Active server page.
How do asp pages work?
What are the attributes of the