动态为HTML表添加超链接控件 [英] Adding hyperlink control dynamically for html table

查看:107
本文介绍了动态为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

推荐答案

如果表是静态的,并且您想在运行时添加超链接,则
If the table is static and you want to add the hyperlink at runtime then
<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);


希望 [ ^ ]将有帮助您.
Hope this[^] will help you.


这篇关于动态为HTML表添加超链接控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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