其他页面中的单选按钮值 [英] radio button value in other page

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

问题描述

我有

< 输入 type = radio name = YourRadioButton value = 2345 > 新闻< br / >
< input type = radio 名称 = YourRadioButton value = 47458 < span class =code-keyword>> 字母< br / >

< a href = clicked.aspx > clickhere < / a >

当用户点击任何单选按钮,然后点击clickhere,in点击.aspx,我得不到

YourRadioButton的价值

var YourRadioButton = Request.Form [YourRadioButton]; //这是null

关于

maulik shah

解决方案

好的是- 这将是。原因是当前页面不包含单选按钮,并且执行它的页面不再可用。



您可以执行以下操作:

1)每次更改时,将radion按钮的值发送到服务器,并使用它来更新Session变量。然后在加载时使用会话变量来更新新页面。

2)通过javascript将单选按钮值存储在cookie中,并在加载新页面时检查它。

I have

<input type="radio" name="YourRadioButton" value="2345">News<br />
<input type="radio" name="YourRadioButton" value="47458">Letters<br />

<a href="clicked.aspx" >clickhere</a>

and when user clicks on any radio button , then clicks clickhere, in clicked .aspx , i dont get

value of YourRadioButton

var YourRadioButton = Request.Form["YourRadioButton"];   // this is null

regards

maulik shah

解决方案

Well yes - it will be. The reason being that the current page does not contain the radio button, and the page that does it no longer available.

There are a couple of things you can do:
1) Send the value of the radion button to the server each time it changes and use it to update a Session variable. You then use the session variable to update the new page when you load it.
2) Store the radio button value in a cookie via the javascript and check that when you load the new page.


这篇关于其他页面中的单选按钮值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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