All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
c#.net连接access操作类_[Asp.Net教程]
ASP.NET,2.0实现防止同一用户同时登陆_.net资料_编程技术
Sql,server2005,sp1发布_[SQL,Server教程]
c#(或vb.net)程序编码优化_[Asp.Net教程]
asp.net,将文字内容和图片插入到Access_[Asp.Net教程]
如何用.NET技术在线生成网站LOGO_[Asp.Net教程]
ADO.NET,2.0:如何排除错误信息_.net资料_编程技术
编辑web.config,保证ASP.NET的安全_.net资料_编程技术
Asp.net动态生成html页面的一种方法_[Asp.Net教程]
PHP教程:简单学习动态网页制作PHP中的Sessions_[PHP教程]
Reading number is top 10 pictures
Lewd,it is too lewd.
两张抽象画
A man's favorite things8
Chinese paper-cut grilles art appreciation4
30 beautiful school beauty4
So beauty, will let you spray blood2
漂亮的跳舞妹妹1
Fan bingbing black wings for platform and DanLuoWang believes beauty2
A resort photographed beautiful young woman change clothes process vomiting blood1
Street street fighting
Download software ranking
Prostitutes diary
C#与.NET技术平台实战演练
软件工程思想
Tram sex maniac 2 (H) rar bag2
The Bermuda triangle1
仙剑奇侠传98硬盘WINXP版
Boxer's Top ten classic battle3
Detective task-the top secret prostitution files
Boxer vs Yellow1
都市狐狸姑娘传
qq published in(发表于) 2014/7/9 1:37:50 Edit(编辑)
asp.net2.0服务器控件之RadioButton控件

asp.net2.0服务器控件之RadioButton控件

asp.net2.0服务器控件之RadioButton控件

RadioButton控件

1.功能

RadioButton控件是一种单选按钮控件,允许用户从给出的选项集中仅选出一个选项。通过为所有的单选按钮分配相同的GroupName,强制执行该限制条件。

2.属性

RadioButton控件常用属性及描述如表1所示。



表1 RadioButton控件常用属性及描述

使用GroupName属性指定一组单选按钮,以创建一组互相排斥的控件。当只能从可用选项列表中选择一项时,可使用GroupName属性。设置该属性后,每次只能使该组中的一个 RadioButton为选中状态。

例如,在网页上添加一个RadioButton控件,ID属性分别设为rbtnSex1和rbtnSex2,Text属性分别设为“男”和“女”。由于对性别的选择,只能选择一项,故将这两个RadioButton按钮的GroupName设置为同一个。代码如下:

//设置RadioButton控件显示的文本

this.rbtnSex1.Text = "男";

this.rbtnSex2.Text = "女";

//设置RadioButton控件所属的组

this.rbtnSex1.GroupName = "Sex";

this.rbtnSex2.GroupName = "Sex";

运行结果如图1所示



图1 RadioButton控件的运行结果图

3.方法

交叉链接:RadioButton控件常用方法同Label控件类似,可参见Label控件常用方法。

4.事件

交叉链接:RadioButton控件常用事件同CheckBox控件类似,可参见CheckBox控件常用事件。




添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.