I know the question is a bit subjective, but often there is a consensus as to a whether a style should be avoided or is considered harmless.
I have elements of actual HTML mixed in with a lot of my ASP.NET markup. I don’t know enough about what goes on in the background to determine whether this should be avoided or if it is harmless.
I recently read that all styling elements should be left out of ASPX files and relegated to CSS; this seems wise for a variety of reasons.
I’m wondering if HTML code should be replaced by corresponding ASP as it is harder to control from the code behind, or if it is perhaps recommended to put actual HTML code as it is less do to when the page is rendered.
When the asp.net compiler parses your
.aspxfiles, it converts everything that’s not already arunat="server"control into an<asp:literal>control so that it can construct code (be it c# or vb.net) from your markup that generates the page.Ultimately there’s probably very little difference, performance wise, but if you have no reason to manipulate a particular element from your codebehind it probably makes sense to leave it as “pure” HTML, for readability if nothing else.