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"/>
<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
How do I create an aspx file?
How do I save an asp file as a pdf?
Define server object?
Explain the difference between post & get method in asp?
What are the asp objects?
Can I use .net framework components from a com program?
difference between partial and public ?
Explain what are the methods in session object in asp?
Is asp a language?
Can I use com objects from a .net framework program?
Resource Files: How to use the resource files, how to know which language to use?
What is the difference between post and get method.
Explain what are the attributes of the tags? What are their functions?
Explain the properties of session object?
What does asp stand for?