quiz answerhttp://forums.asp.net/t/1774492.aspx/1?quiz+answerMon, 05 Mar 2012 14:55:23 -050017744924854074http://forums.asp.net/p/1774492/4854074.aspx/1?quiz+answerquiz answer <p>i have make a quiz i have tow table.</p> <p>one table is this like</p> <p>Question id</p> <p>Question</p> <p>write answer</p> <p>ans1</p> <p>ans2</p> <p>ans3</p> <p>ans4</p> <p></p> <p>Second table is Employee</p> <p>Question id</p> <p>emp_no</p> <p>emp_name</p> <p>emp_answer</p> <p>emp_result</p> <p></p> <p>In emp_answer stored to Radiobutton is select value like this</p> <p>public void answer()<br> {<br> int userans = 0;</p> <p>if (answer1.Checked == true)<br> {<br> userans = 1;<br> }</p> <p>if (answer2.Checked == true)<br> {<br> userans = 2;<br> }</p> <p>if (answer3.Checked == true)<br> {<br> userans = 3;<br> }</p> <p>if (answer4.Checked == true)<br> {<br> userans = 4;<br> }</p> <p>SqlCommand cmd = new SqlCommand(&quot;Insert into emp1(emp_ans)values(@ans)&quot;, con);<br> cmd.Parameters.AddWithValue(&quot;@ans&quot;, userans.ToString());<br> con.Open();<br> cmd.ExecuteNonQuery();<br> con.Close();<br> }</p> <p></p> <p>than user click next button i have showing to user message user answer is write or worng.</p> <p>every time.</p> <p>how can i perform this like operation in my web page.</p> <p>in First table is write answer is already is defind.</p> <p>plz how to two table through my operation is perform.</p> <p>plz help me</p> 2012-02-28T05:45:20-05:004864610http://forums.asp.net/p/1774492/4864610.aspx/1?Re+quiz+answerRe: quiz answer <p>Hi,</p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>kadavla</h4> <p></p> <p>than user click next button i have showing to user message user answer is write or worng.</p> <p>every time.</p> <p>how can i perform this like operation in my web page.</p> <p></p> </blockquote> <p></p> <p>Well, that indicates you want to create a question wizard for users, users just can answer one question once time and you want to show the result when user click the next button. If I don't misunderstand your requirement. The Wizard control may be your consideration:</p> <p>The <span>Wizard</span> control uses steps to delineate different sections of user data input</p> <p><a href="http://msdn.microsoft.com/en-us/library/fs0za4w6.aspx">http://msdn.microsoft.com/en-us/library/fs0za4w6.aspx</a></p> <p>When users click the next button, you need to compare the value users selected to the right anser stored in the database and then show the result.</p> 2012-03-05T14:55:23-05:00