is there a way to write this code from an aspx page
to a behind code of the aspx page (cs), in asp.net.
<a rel="lightbox" id="userImageLightBox" runat="server" title="profile image">
<img id="userImage" runat="server" width="150" height="146" alt="" src=""/>
</a>
for example if i have the code in apsx:
<asp:Label ID="pageProfileHeadName" runat="server" Visible="true"/>
in the behind code i can do:
Label label = new Label();
label.ID = "pageProfileHeadName";
label.Visible = true;
thanks
Since you have already set the
runat="server"attribute, you can access the HTML controls in your code-behind through itsid:Update: If you want to create the HTML from the code-behind, you can do as JonH wrote:
Oh, and please increase your accept rate.