单选按钮 [英] radiolistbutton

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

问题描述

嗨 如何从单选按钮列表中选择一个单选按钮
并在另一页上使用它?
我应该使用会话?
还是上课?
或查询字符串?
---------
我有2页,在第一页上有单选按钮列表,带有颜色,
当我选择一个单选按钮时,我想转到第2页并更改背景颜色,即我从单选按钮列表中在第1页中选择的背景颜色...

解决方案

写道:​​

我应该使用会话吗?
还是上课?
或查询字符串?
还是我可以使用简单的解决方案?



所有这些解决方案都很容易.它们都可以工作(好吧,我收回了,班级"是什么意思?).它们确实与单选按钮列表无关,但与状态管理无关.我会尽可能使用查询字符串,如果需要的话使用viewstate,如果没有选择的话使用session.根据您的要求,您知道答案,并且不提供有关您情况的详细信息,可以帮助我们告诉您要使用的是哪种情况,只是您似乎不认为使用查询字符串或会话是可行的.简单.如果您不这样认为,则应该购买一本书并阅读,因为一旦您理解了它们,就可以轻而易举地使用它们.


写道:​​

当我选择一个单选按钮时,我想转到第2页并更改背景颜色,即我在第1页中从单选按钮列表中选择的背景颜色...



确定,因此将其放在URL上.然后,您的第二页可以在任何地方设置其颜色,并且您使用的颜色可以添加书签.


hi how can i select one radio button from radio button list
and use this at another page?
i should use session?
or class?
or query string?
---------
i have 2 page,at the first page i have radio button list,with color,
when i choose one radio button i want to go to page 2 and change the background color,that i selected in page 1 from radio button list...

解决方案

wrote:

i should use session?
or class?
or query string?
or i can use easy solution?



All those solutions are easy. They will all work ( well, I take it back, what do you mean by ''class'' ? ). They really have nothing to do with the radiobuttonlist, but with state management. I''d use the query string where ever possible, viewstate if I need to, and session if I have no choice. Based on what you''ve asked, you know the answers, and provide no details about your situation that help us tell you which one to use, except that it seems that you don''t think that using the query string or session are easy. If you don''t think that, you should buy a book and read it, because once you understand them, they are trivial to use.


wrote:

when i choose one radio button i want to go to page 2 and change the background color,that i selected in page 1 from radio button list...



OK, so put it on the URL. Then your second page can set it''s color from anywhere, and the color you use, is bookmarkable.


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

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