惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
J
Java Code Geeks
WordPress大学
WordPress大学
博客园 - 【当耐特】
博客园 - 叶小钗
小众软件
小众软件
博客园 - 聂微东
宝玉的分享
宝玉的分享
量子位
人人都是产品经理
人人都是产品经理
博客园_首页
罗磊的独立博客
腾讯CDC
美团技术团队
Google DeepMind News
Google DeepMind News
W
WeLiveSecurity
I
InfoQ
Engineering at Meta
Engineering at Meta
云风的 BLOG
云风的 BLOG
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Threat Research - Cisco Blogs
Google DeepMind News
Google DeepMind News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Hacker News: Front Page
B
Blog RSS Feed
L
LangChain Blog
C
Check Point Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
G
GRAHAM CLULEY
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Microsoft Azure Blog
Microsoft Azure Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园 - Franky
S
Schneier on Security
Attack and Defense Labs
Attack and Defense Labs
Microsoft Security Blog
Microsoft Security Blog
N
Netflix TechBlog - Medium
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Tenable Blog
Simon Willison's Weblog
Simon Willison's Weblog
L
LINUX DO - 热门话题
阮一峰的网络日志
阮一峰的网络日志
Hacker News: Ask HN
Hacker News: Ask HN
A
Arctic Wolf
Schneier on Security
Schneier on Security
The Last Watchdog
The Last Watchdog
Latest news
Latest news
T
The Exploit Database - CXSecurity.com

博客园 - skylai

mvc3 小技巧 WCF学习之旅(一)---Hello World. WCF Client configuration Jquery表单验证 Jquery的一些常用信息 二进制、SOAP的序列化及反序列化 简单的Attribute实现. 泛型之泛型约束 C#泛型之泛型委托 C#2.0泛型介绍之简单泛型类。 序列化之XML序列化(一) Vs2005的win form动态生成菜单 强制字符换行CSS版和C#版 js操作xml 读写XML文件 js的一些杂谈 一个button同时执行多个有返回值的函数的解决方法(return false; or return true;) 限制字符输入(ASCII 码) 前两天刚看书看到的,来这里跟大家分享一下有关C#处理指令的问题
DataGrid里应用radio单选按钮
skylai · 2005-12-19 · via 博客园 - skylai

梆定数据

        private void dgRelated_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
        
{
            
if( e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item )
            
{
                Label lbl ; 
                lbl  
= (Label)e.Item.FindControl("lblradio");
                Label lblid 
= (Label)e.Item.FindControl("lblID");
                
if (Convert.ToInt32(lblid.Text.Trim()) == this.RelatedQuestionID)
                
{
                    lbl .Text 
= "<input id=rorelated type=radio name='Related' value="+lblid.Text.Trim()+" checked>";
                }

                
else
                
{
                    lbl .Text 
= "<input id=rorelated type=radio name='Related' value="+lblid.Text.Trim()+" >";
                }

            }

        }

获取选中的值。

            string relatedID = "";
            
if (Request.Form["Related"!= null)
            
{
                relatedID 
= Request.Form["Related"].ToString();
            }

            
int result=0;
            
if (relatedID != null && relatedID != "")
            
{
                result 
= Convert.ToInt32(relatedID);
            }

posted @ 2005-12-19 11:27  skylai  阅读(648)  评论(0)    收藏  举报

刷新页面返回顶部