When to use runat=“server” on normal HTML

后端 未结 5 693
北荒
北荒 2020-12-28 16:09

Is it ever appropriate to use runat=\"server\" on a standard HTML element instead of a true ASP.NET control? I have full control over setting the html/text of the normal el

5条回答
  •  猫巷女王i
    2020-12-28 16:31

    The only reason I have used server html controls is when I needed the flexibility of writing my own html but still needed to access it's properties in code behind.

    In code behind:

    mySpecialHtml.InnerHtml = "something else";
    

提交回复
热议问题