如何使用在运行时创建的单选按钮 [英] how can I use radio buttons which are created in run time

查看:91
本文介绍了如何使用在运行时创建的单选按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个严重的问题.在解决此问题的同时,我还有更多
10个运行时单选按钮,每个按钮中都有一个唯一的ID.从按钮单击调用时,出现空引用异常.我使用"findControl"方法尝试了很多次.许多人建议我在button_click中再次重用控件.但是,在重新创建为每个控件创建的新ID时,所有ID的默认值都未经检查,但是我需要找到已选中的一个和未选中的一个.
请帮助我,我受了很多苦.

提前非常感谢您.

Hi all,

I had a serious problem. While solving this problem I had more then
10 run time radio buttons each having a unique id in it. While calling from button click, I am getting a null reference exception. I tried many times by using "findControl" method. Many people suggested me to reuse controls again in button_click. But, while recreating new id''s created for every control all are having default value unchecked, but I need to find which one is checked and which one is unchecked.
Please please help me, I am suffering a lot.

Thank you very very much in advance.

推荐答案

您已经在这里提出问题-
Already you have asked here - finding dynamic radiobutton checked or not[^] & also answers there.


这篇关于如何使用在运行时创建的单选按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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