c# - Online Quiz Application check selected Radio Button -
i developing online quiz..in use use 4 radio buttons. , bind answers in it..at time 1 ques ans displayed in page..by clicking next button next question ans bind in same fields...my problem user ans for every question..when user click previous button previous question answer bind.but radio button not in check..i want check radio buttons selected users....
my code next button bind is
quesinsertbol bol = new quesinsertbol(); quesinsertbal bal = new quesinsertbal(); dt = bal.selectques(bol); viewstate["i"] = (int)viewstate["i"] - 1; int = convert.toint16(viewstate["i"]); int = 0; if (i >a) { if (dt != null || == dt.rows.count - 1) { lblquest.text = dt.rows[i]["question"].tostring(); rdbch1.text = dt.rows[i]["opt1"].tostring(); rdbch2.text = dt.rows[i]["opt2"].tostring(); rdbch3.text = dt.rows[i]["opt3"].tostring(); rdbch4.text = dt.rows[i]["opt4"].tostring(); txtans.text = dt.rows[i]["correctans"].tostring(); btnnxt.enabled = true; } else { } } else { btnprevious.enabled = false; }
thanks in advance
since you're using basic radio buttons you'll need determine button matches value , issue line this:
rdbch1.checked = true;
Comments
Post a Comment