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
Explain the tasks performed by <> tags?
Define html (hypertext markup language)?
Is asp classic dead?
What is caching in asp?
Explain how to refresh an asp page on a single click of a button?
i am creating an e-learning site, i want my customers to pay directly through paypall to my paypall account directly from my page ? is it possible ? is there any ready paypall script ?
Define querystring collection?
What is querystring collection in asp?
textbox has viewstate property,but it does not depend on its property to retain their data across page,Explain.
Define application object?
What does asp mean in technology?
How do I create an aspx file?
How do I print an aspx file?
How can we do validation of the fields in a project?
Distinguish functionalities of ASP in web design.