Posted on: 10/14/2013 7:04:41 AM | Views : 656

Hi all,
I created an online quiz that refered to this tutorial. [Build a Quiz Engine 2]. The code for 'Next' button are like below:

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Try Dim dr As System.Data.DataRowView dr = CType(DetailsView1.DataItem, System.Data.DataRowView) Dim a As Answer = New Answer() a.QuestionID = dr("QuestionOrder").ToString() a.CorrectAnswer = dr("CorrectAnswer").ToString() a.UserAnswer = DropDownList1.SelectedValue.ToString() Dim al As ArrayList al = CType(Session("AnswerList"), ArrayList) al.Add(a) Session.Add("AnswerList", al) ...

Go to the complete details ...