使用ASP点网网上问答 [英] online quiz using ASP dot NET

查看:128
本文介绍了使用ASP点网网上问答的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

斐伊川,

我需要开发将有一个多选题在线测试网站。我希望有每页显示与数字寻呼机一个问题,使用户可以来回走。

I need to develop an online quiz website that would be having MCQs. I would want to have one question appearing per page with a Numeric Pager so that the user can go back and forth.

我尝试使用FormView控件来显示的问题和单选按钮。我创建了一个类QANS,将举行由用户为他做的答案,这样我以后可以总结总比分问题选择答案。

I tried using the FormView for displaying the questions and RadioButtons. I created a class QANS that would hold the answer selected by the user for the questions that he did answer so that I can later sum up the total Score.

现在,我面临的问题是如下:

Now, the problem I'm facing is as below:

让用户选择一个单选按钮,说R,上的PageIndex,说我,然后转到其他页面,说K.当用户返回到我页,没有单选按钮的选择。
我尝试添加code用于设置单选真正在Page_Load()的Checked属性,但它并没有帮助。我也试图与PageIndexChanged和PageIndexChanging事件相同,但单选按钮没有得到检查。

Let the user select a RadioButton, say R, on a PageIndex, say I, and then go to some other page, say K. When the user returns back to page I, none of the RadioButtons is selected. I tried adding code for setting the Checked property of the RadioButton true in the Page_Load(), but it didn't help. I also tried the same with the PageIndexChanged and PageIndexChanging event, but the RadioButton doesn't get checked.

被选定为一个特定的疑问,单选按钮已被存储,我可以打印它使用的Response.Write(其中之一),但我不能够保持单选按钮选中。
怎能这样做?

The RadioButton that was selected for a particular question has been stored and I am able to print which one it was using Response.Write() but I'm not able to keep the RadioButton Checked. How shall this be done?

推荐答案

您应该能够使检查单选按钮

You should be able to make the radio button checked in the

protected override void OnPreRender(EventArgs e)

页面生命周期事件

event of the page lifecycle

这篇关于使用ASP点网网上问答的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆