回发到同一页面后如何保留单选按钮的值 [英] How to retain the value of radio button after post back in the same page

查看:83
本文介绍了回发到同一页面后如何保留单选按钮的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以帮助我它非常紧急的事情...

回发到同一页面后如何保留单选按钮的值

在此先感谢
Sushil Dharmar
< EDIT>删除了手机号码....</EDIT>

Any one help me its very urgent plz...

How to retain the value of radio button after post back in the same page

Thanks in advance
Sushil Dharmar
<EDIT>Removed the mobile number....</EDIT>

推荐答案

,您可以使用
获得单选按钮的值.
you get the value of radio button using
Request.Form(name)

-单选按钮的名称.


将该单选按钮控件的EnableViewState属性设置为true.
set EnableViewState property to true for that radio button control.



使用
页面load_event()
{
If(isPostback)
{
返回;
}
}

那么您的单选按钮的价值就会持续...
use at the

page load_event()
{
If(isPostback)
{
return;
}
}

then your value of radio button sustained...


这篇关于回发到同一页面后如何保留单选按钮的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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