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

1)textbox 2 listbox

<%@ Page Language="VB" %>
<script runat ="server">
Sub Add_Item(ByVal Source As Object, ByVal e As
EventArgs)
Dim str As String
str = text1.Text
List.Items.Add(str)
text1.Text = ""
End Sub
</script>

<html>
<head>
<title>Untitled Page</title>
</head>
<body bgcolor="aqua">
<form id="form1" runat="server">
<center><h2>
<asp:Label ID="Label1" Text ="Adding Items In ListBox"
runat="server"/>
</h2></center>
<br/><br/><br/><br/>
<asp:Label ID="Label2" Text ="Enter Text :"
runat="server"/>
<asp:Textbox ID="text1" runat="server"/>
<asp:RequiredFieldValidator ID = "R" ControlToValidate
= "text1" Text = "Enter Text First" runat
= "server"/>&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="B" OnClick = "Add_Item" text = "
OK " runat= "server"/>
<br/><br/>
<asp:Listbox ID="List" rows = "10" runat= "server"/>
</form>
</body>
</html>

Is This Answer Correct ?    20 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I create an aspx file?

668


How do I save an asp file as a pdf?

687


Define server object?

703


Explain the difference between post & get method in asp?

700


What are the asp objects?

697


Can I use .net framework components from a com program?

676


difference between partial and public ?

1846


Explain what are the methods in session object in asp?

658


Is asp a language?

681


Can I use com objects from a .net framework program?

678


Resource Files: How to use the resource files, how to know which language to use?

1611


What is the difference between post and get method.

712


Explain what are the attributes of the tags? What are their functions?

701


Explain the properties of session object?

681


What does asp stand for?

697