gridview模板字段中的单选按钮 [英] radio button in gridview template field

查看:57
本文介绍了gridview模板字段中的单选按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ASP.NET制作考试Web应用程序。我正在使用网格视图来显示问题及其选项。我设置网格视图的大小为1,因此它只显示页面索引上的一个问题。我使用单选按钮进行多项选择。当我选择一个单选按钮并转到网格视图的下一个问题或下一页索引并再次回到上一个问题时,我看到我之前选择的单选按钮没有被选中。我为此做了什么?

i am making a exam web application in ASP.NET. i am using grid-view for showing question and it's options.I set size of grid view is 1 so it display only one question on a page-index.I am using radio button for multiple choice option. when i select a radio button and going to next question or next page index of grid-view and come again previous question then i see that the radio button which i selected previously is not selected.what i do for this ?

推荐答案

尝试使用if(!ispostback)属性
try using if(!ispostback) property


这篇关于gridview模板字段中的单选按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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