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)



Answers were Sorted based on User's Feedback



1)Declare array with five elements a[]={8,4,6,2,1,10} Print minimum and maximum no from array. ..

Answer / niki

hmmmm ur posting tmv assignemnts questions.im laso from tmv

Is This Answer Correct ?    45 Yes 11 No

1)Declare array with five elements a[]={8,4,6,2,1,10} Print minimum and maximum no from array. ..

Answer / 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

1)Declare array with five elements a[]={8,4,6,2,1,10} Print minimum and maximum no from array. ..

Answer / aparna

first answer is
we can use sort() method to call for displaying min to max
integers

second one
very simple method just pass the text box value to the list
box in button click even

Is This Answer Correct ?    15 Yes 3 No

1)Declare array with five elements a[]={8,4,6,2,1,10} Print minimum and maximum no from array. ..

Answer / sangram singh thakur(t.y.b.c.a

assignment 3-2


<%@ Page Language=VB Debug=true %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SQLClient" %>
<script runat=server>
Sub SubmitBtn_Click(Sender As Object, E As EventArgs)
Dim DBConn as SQLConnection
Dim DBAdd As New SQLCommand
' DBConn = New SQLConnection("server=localhost;" _
' & "Initial Catalog=TT;" _
' & "User Id=sa;" _
' & "Password=yourpassword;")
DBConn = New SQLConnection("Data Source=whsql-
v08.prod.mesa1.secureserver.net;Initial
Catalog=DB_49907;User ID=java2suser;Password='password';")
DBAdd.CommandText = "Insert Into Employee (" _
& "LastName, FirstName, Salary " _
& ") values ('" & txtLastName.Text & "'," _
& "'" & txtFirstName.Text _
& "'," & txtSalary.Text & ")"

DBAdd.Connection = DBConn
DBAdd.Connection.Open
DBAdd.ExecuteNonQuery()
End Sub
</SCRIPT>
<HTML>
<HEAD>
<TITLE>Adding SQL Server Data</TITLE>
</HEAD>
<Body LEFTMARGIN="40">
<form runat="server">
<BR>
Last Name:
<BR>
<asp:textbox id="txtLastName" runat="Server"/>
<BR>
First Name:
<BR>
<asp:textbox id="txtFirstName" runat="Server"/>
<BR>
Salary:
<BR>
<asp:textbox id="txtSalary" runat="Server"/>
<BR><BR>
<asp:button id="butOK" text="OK" onclick="SubmitBtn_Click"
runat="server"/>
</form>
</BODY>
</HTML>

Is This Answer Correct ?    11 Yes 2 No

1)Declare array with five elements a[]={8,4,6,2,1,10} Print minimum and maximum no from array. ..

Answer / 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

More ASP Interview Questions

What are the Web Servers supporting ASP?

1 Answers   TCS,


What's the purpose of using BUFFER property?

2 Answers  


how can we done appllication deployment

0 Answers   3i Infotech, HCL,


what is the role of attributes properties in asp field object

0 Answers  


What must be installed on an IIS4 machine to use the CDONTS e-mail server object? A. FTP service B. SMTP service C. IIS administrator D. Exchange Server E. IPX/SPX protocol

1 Answers  


How to run FileSystemObject in ASP

1 Answers   Karvy,


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)

5 Answers  


How does non-deterministic garbage collection affect my code?

0 Answers  


Explain how big is the data type int in .net?

0 Answers  


What are the function of attributes of the <form> tags?

0 Answers  


What is aspx cs file?

0 Answers  


What is difference between aspx and razor?

0 Answers  


Categories