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


Please Help Members By Posting Answers For Below Questions

why did u choose tech support as ur careears

2089


How can I see what assemblies are installed in the global assembly cache?

527


Can we Use VB SCRIPT instead of JAVASCRIPT in Asp.Net...

1842


difference between html and asp?

2016


What is asp cookies?

484






What is the common type system (cts)?

525


Explain the post & get method?

531


what is the role of attributes properties in asp field object

1465


What is the use of global.asax?

503


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)

2029


What are the tasks performed by <> tags?

497


write a program for sorting of all students records in a class according to roll no. using ADO and corresponding database.

1429


Explain what inheritance is and an example of when you might use it?

502


Define application object?

500


How to convert a string into an integer in .net?

512