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 do I print an aspx file?
What is asp contentplaceholder?
What are the properties of session object?
What is the difference between cshtml and aspx?
What are the differences between asp and asp.net and is asp.net backward compatible to asp?
Why .Net Does not Support multiple inheritance?
Define a variable in asp?
How does non-deterministic garbage collection affect my code?
Explain how big is the data type int in .net?
Is classic asp still supported?
Define extranet?
What are the stored procedures?
What is the difference between the value-type variables and reference-type variables
What is asp cookies?
What is asp code?