Remove or add attribute runat="server"

0

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.

    
asked by Necroyeti 27.07.2017 в 00:04
source

0 answers