i want to develope a page for online test using asp.net
with c#.net. so, how to insert the questions in the
database sqlserver2000 and how to pick the questions
randomly when user login for test. plz send the code for
this....

Answers were Sorted based on User's Feedback



i want to develope a page for online test using asp.net with c#.net. so, how to insert the questi..

Answer / varasri

the query for random selection is
select * from tablename order by newid()

Is This Answer Correct ?    32 Yes 8 No

i want to develope a page for online test using asp.net with c#.net. so, how to insert the questi..

Answer / raju

by using RAND(value) u can get the random Questions....like
below


Select * from table1 where ID=(5*Rand()+1)

Is This Answer Correct ?    16 Yes 6 No

i want to develope a page for online test using asp.net with c#.net. so, how to insert the questi..

Answer / ravi

In ORACLE
select * from questions
order by (id * dbms_random.random)

Is This Answer Correct ?    4 Yes 5 No

Post New Answer

More ASP.NET Interview Questions

What are sql notifications and sql invalidations?

0 Answers  


Explain the concept of event bubbling in ASP.NET?

0 Answers   Sans Pareil IT Services,


What is a swagger in web api?

0 Answers  


You have two buttons in web form and i clicked on one of the button, so how do i find which button i've clicked on the form in my page load?

15 Answers   INDUS,


Hi this is the coding for adding data in to an xml table i want the coding for update and delete Try Dim emp_xml_doc As New XmlDocument If System.IO.File.Exists(Server.MapPath("emp.xml")) Then emp_xml_doc.Load(Server.MapPath("emp.xml")) Dim myrow_element As XmlElement myrow_element = emp_xml_doc.CreateElement("EmpDetails") Dim str As String str = "<EmpID>" & TxtEmpId.Text & "</EmpID>" & _ "<Empname>" & TxtName.Text & "</Empname>" & _ "<EmpSalary>" & TxtSalary.Text & "</EmpSalary>" myrow_element.InnerXml = str emp_xml_doc.DocumentElement.AppendChild(myrow_element) emp_xml_doc.Save(Server.MapPath("emp.xml")) Response.Write("Record Saved") Dim ds As New DataSet ds.ReadXml(Server.MapPath("emp.xml")) GridView1.DataSource = ds GridView1.DataBind() Else Response.Write("File does not exist.") End If Catch ex As Exception Response.Write(ex.ToString) End Try *********************** this is the xml file <?xml version="1.0" encoding="utf-8" ?> <Employee> <empdetails> <empid>100</empid> <empname>xxx</empname> <empsalary>2000</empsalary> </empdetails> <EmpDetails> <EmpID>yyy</EmpID> <Empname>dddd</Empname> <EmpSalary>77777</EmpSalary> </EmpDetails> <EmpDetails> <EmpID>rrrr</EmpID> <Empname>rrrr</Empname> <EmpSalary>6666</EmpSalary> </EmpDetails> <EmpDetails> <EmpID>qaqa</EmpID> <Empname>sini</Empname> <EmpSalary>50000</EmpSalary> </EmpDetails> <EmpDetails> <EmpID>errrrrrrrr</EmpID> <Empname>rrrrrrrrr</Empname> <EmpSalary>677777</EmpSalary> </EmpDetails> <EmpDetails> <EmpID>rrr</EmpID> <Empname>rrr</Empname> <EmpSalary>33</EmpSalary> </EmpDetails> </Employee>

0 Answers   InfoCom,






What is page fragment caching?

0 Answers  


What is side-by-side execution? Can two applications, one using a private assembly and other using a shared assembly, be stated as side-by-side executables?

0 Answers  


what is webpart? what r the parts in this webpart (zone)

2 Answers  


Explain ViewState?

0 Answers   QuestPond,


Difference between Dataset and DataReader ?

4 Answers   Accenture, BirlaSoft, Infosys, Microsoft, Techseol,


I have an excel file with data, i am importing this excel file data into Sqlserver 2005 database. while importing i am getting wrong data(ie, special characters) in one column(description column), upto some limit the data in that column is coming fine,after that data is coming like below. The "Walter" leather storage bench is one of our most popular styles. The top with the tufting and double stitching finish a very impressive piece. The size is perfect in front of beds and the storage adds another functional bonus. Open it up and sneak al&#65533;&#65533;&#65533;&#435;&#65533;Â&#65533;&#65533;&#436;&#65533;Ã&#65533;&#65533;&#438;&#65533;Å&#65533;&#65533; al&#65533;&#65533;&#65533;&#435;&#65533;Â&#65533;&#65533;&#436;&#65533;Ã&#65533;&#65533;&#438;&#65533;Å&#65533;&#65533; Is there anywhy to resolve this? (I am using recordset in coding for developing import process.) please help me soon.

0 Answers  


How do you store a value in viewstate and retrieve them?

0 Answers  


Categories