My question is timely, is there any way to remove or add the attribute runat="server
"dynamically to a tag?
I explain. If I have over there a div
in HTML
:
<div id="un_div" runat="server">Cualquier cosa</div>
And I have the event Onclick
of a button:
protected void re_Click(object sender, EventArgs e){
}
Is it possible to do something similar to this?:
protected void re_Click(object sender, EventArgs e){
un_div.Attributes.Add("runat","");
}
I know that the previous thing was very crazy, but it was more or less so that they had an idea of what I am looking for and to know if this is possible.