查找在运行时创建的单选按钮ID [英] finding radio button id created at runtime

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

问题描述

嗨...全部

我已经在dropdown_selected更改的事件上创建了运行时单选按钮
现在用户选中了某些单选按钮,而未选中某些单选按钮
现在在按钮上单击,我需要获取使用查找控制方法进行检查和未检查的一个,但每次出现空引用异常时,任何人都可以帮助我.....


在此先感谢</pre>

hi.... all

i had created run time radio buttons on dropdown_selected changed event
and now user checked some radio buttons and unchecked some radio buttons
now on button click i need get which one is checked and unchecked i tried by using find control method but every time null reference exception coming can any one help me please please.....


thanks in advance</pre>

推荐答案

您需要重新创建按钮单击回发上的单选按钮,以便跟踪所做的更改.这是因为您是在运行时根据下拉列表更改创建它们的,因此在回发/重新加载期间丢失了它们.
You need to re-create the radio buttons on the button click postback in order to track the changes made. This is because you created them at runtime on dropdown change and so during postback/reload it is missing.


这可以帮助您了解如何解决问题的逻辑
获取动态生成的值 [
this may help you to get the logic of how to solve your question
get value of dynamically generated[^]


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

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