如何从网格视图中使用的复选框中获取值作为模板字段? [英] how to get value from check box which is used in a grid view as a template field ?

查看:52
本文介绍了如何从网格视图中使用的复选框中获取值作为模板字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想做一个客观的问题回答web项目。我使用gridview来显示问题及其选项。我使用chechBox控件作为模板字段来选择答案。如何获取我在复选框中选择的值我点击提交按钮?

I want to make a objective question answer web project .in which i use a gridview to show question and its options.i use chechBox control as a template field for select a answer.How to get value which I select in checkbox when I click on submit button ?

推荐答案

提交按钮点击,你可以循环遍历 GridViewRows 并找到 CheckBox 控件。然后你可以确定状态。



示例 - 带CheckBox的GridView:在ASP.Net中获取选定的行 [ ^ ]
In Submit button click, you can loop through the GridViewRows and find that CheckBox control. Then you can determine the state.

Example - GridView with CheckBox: Get Selected Rows in ASP.Net[^]


这篇关于如何从网格视图中使用的复选框中获取值作为模板字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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