本文介绍了动态为HTML表添加超链接控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
谁能告诉我如何为html表动态添加超链接控件以及如何为同一超链接添加事件.
关于
Hi everyone,
Can anyone please tell me how to add hyperlink control dynamically for html table and how to add events for the same hyperlink.
Regards
推荐答案
<table id="table1" runat="server">
<tr><td id="td1" runat="server"></td>
<td>failed</td></tr>
</table>
HyperLink hl = new HyperLink();
hc.InnerText = "test test";
hl.ID = "HID";
hl.NavigateUrl = "/test.aspx";
td1.Controls.Add(hc);
这篇关于动态为HTML表添加超链接控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!