LinkBut​​ton的帮助 [英] Help with LinkButton

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

问题描述

您好,

我想在数据库中的任何用></term>括起来的术语上创建一个LinkBut​​ton.标签.我的问题是如何在数据库中创建LinkBut​​ton,而不是当前如何使用它.现在,我将匹配的术语存储在占位符中.
谢谢!


foreach(DataRow行)
{

System.Text.RegularExpressions.Regex regex = new System .Text.RegularExpressions.Regex((?? == term))* *(?=</term>)");
System.Text.RegularExpressions.Match match = regex.Match (row ["Definition"].ToString());

LinkBut​​ton lb1;
lb1 = new LinkBut​​ton();
lb1.Text = match.ToString();
PlaceHolder2.Controls.Add(lb1);

lb1.Click + = new EventHandler(lb1_Click);

}

Hello,

I would like to create a LinkButton on any term in the database that is enclosed by <term></term> tags. My problem is how do I create the LinkButton in the database and not how I currently have it working. Right now I am storing the matched term in a placeholder.
Thanks!!


foreach (DataRow row in rows)
{

System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex("(?<=<term>). *(?=</term>)");
System.Text.RegularExpressions.Match match = regex.Match(row["Definition"].ToString());

LinkButton lb1;
lb1 = new LinkButton();
lb1.Text = match.ToString();
PlaceHolder2.Controls.Add(lb1);

lb1.Click += new EventHandler(lb1_Click);

}

推荐答案

您好lm11,

我强烈建议您在我们的 ASP.NET论坛中发帖>.基本上,它不在这里.
我相信您会在这里得到更多帮助,这里有一些讨论,例如:
动态地将控件添加到PlaceHolder:http://forums.asp.net/p/1124891/1766535.aspx
PlaceHolder动态控制添加项:http://forums.asp.net/p/1268003/2388279.aspx

最佳问候
Hello lm11,

I strongly recommend you post thread in our ASP.NET forum. Basically, it is off-topic here.
I believe you will get more help there, there are some discussion there, for example:
Adding Controls to PlaceHolder Dynamically: http://forums.asp.net/p/1124891/1766535.aspx
PlaceHolder-Dynamic Control Addition: http://forums.asp.net/p/1268003/2388279.aspx

Best regards,


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

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