0

we are creating an aptitude test software. here is the problem we are encountering.. help wud be appreciated

if (RadioButtonList1.SelectedValue == obj[2].ToString() || RadioButtonList11.SelectedValue != "")
{
int corr_ans = Convert.ToInt32(Session["corr_ans_count"]);
corr_ans += 1;
Session["corr_ans_count"] = corr_ans;
}
else
{
int wrong_ans = Convert.ToInt32(Session["wrong_ans_count"]);
wrong_ans += 1;
Session["wrong_ans_count"] = wrong_ans;
}

problem area : as v hav used "RadioButtonList1.SelectedValue" to check whether student has enterd the correct ans or not but "RadioButtonList1.SelectedValue" is holding "null" rather than d selected option from radio button list.even if v enter correct ans then also its taking all answers as wrong answers not giving the correct result. is there any other way to do this... ????

another problem: we are getting error at CONNECT.OPEN even if the connection string is correctly enterd.. ??

Many Thanks

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by srikanthkadem
-1

use SelectedIndex.Value instead of SelectedValue directly.it will solve that issue.and regarding wrong answers i thinkthere might be error with your logic.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.