单选按钮检查问题 [英] Radio button checked problem

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

问题描述

我有多个单选按钮,在选定的收音机上我用保存按钮形成。我用单选按钮runat =server标签做了所有事情。一切都很好,但我想用javascript或jquery,当我从单选按钮删除runat =server标签,它工作正常,但在窗体保存按钮单击重新检查单选按钮默认第一台收音机..



如何防止在代码后面重新检查单选按钮而不使用无线电上的runat =server标签

I've multiple radio button, on selected radio I've form with save button. I done all thing with radio button runat="server" tag. all thing is fine but i want it with javascript or jquery, when i remove runat="server" tag from radio button, its working fine but in the form save button click recheck radio button by default 1st radio..

how do i prevent rechecking radio button from code behind without using runat="server" tag on radio

推荐答案

这是因为当再次加载页面时,所有控件都将重置。您必须将值存储在 ViewState Session 数据库。然后当页面再次加载时,您需要相应地设置控制值。
This is because when page loads again, all controls will reset. You have to store the value somewhere, either in ViewState or Session or Database. Then when page loads again, you need to set the control value accordingly.


这篇关于单选按钮检查问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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