LinkButton的帮助 [英] Help with LinkButton
问题描述
您好,
我想在数据库中的任何用
谢谢!
foreach(DataRow行)
{
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);
}
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,
这篇关于LinkButton的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!