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

推荐订阅源

AWS News Blog
AWS News Blog
Jina AI
Jina AI
量子位
V
V2EX
The GitHub Blog
The GitHub Blog
阮一峰的网络日志
阮一峰的网络日志
The Cloudflare Blog
博客园 - 【当耐特】
博客园 - 叶小钗
T
The Blog of Author Tim Ferriss
L
LangChain Blog
博客园_首页
aimingoo的专栏
aimingoo的专栏
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Check Point Blog
T
Tailwind CSS Blog
M
MIT News - Artificial intelligence
Engineering at Meta
Engineering at Meta
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
宝玉的分享
宝玉的分享
博客园 - 聂微东
G
Google Developers Blog
C
CERT Recently Published Vulnerability Notes
K
Kaspersky official blog
NISL@THU
NISL@THU
Hacker News: Ask HN
Hacker News: Ask HN
腾讯CDC
Security Archives - TechRepublic
Security Archives - TechRepublic
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
Google DeepMind News
Google DeepMind News
The Register - Security
The Register - Security
H
Hacker News: Front Page
Webroot Blog
Webroot Blog
有赞技术团队
有赞技术团队
W
WeLiveSecurity
Martin Fowler
Martin Fowler
S
Security @ Cisco Blogs
L
LINUX DO - 最新话题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
WordPress大学
WordPress大学
雷峰网
雷峰网
PCI Perspectives
PCI Perspectives
月光博客
月光博客
SecWiki News
SecWiki News
Hacker News - Newest:
Hacker News - Newest: "LLM"
N
News | PayPal Newsroom
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
C
Cyber Attacks, Cyber Crime and Cyber Security

博客园 - 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)    收藏  举报

刷新页面返回顶部