【发布时间】:2012-01-31 00:01:00
【问题描述】:
有没有办法从 aspx 页面编写此代码 到 asp.net 中的 aspx 页面 (cs) 的后台代码。
<a rel="lightbox" id="userImageLightBox" runat="server" title="profile image">
<img id="userImage" runat="server" width="150" height="146" alt="" src=""/>
</a>
例如,如果我在 apsx 中有代码:
<asp:Label ID="pageProfileHeadName" runat="server" Visible="true"/>
在后面的代码中我可以做到:
Label label = new Label();
label.ID = "pageProfileHeadName";
label.Visible = true;
谢谢
【问题讨论】:
标签: c# asp.net code-behind