runatserver - Why does ASP.NET webforms need the Runat="Server" attribute? -
why have specify runat="server" on asp.net controls when mandatory attribute , server option available in limited knowledge of asp.net, , error if don't use it?
i understand can optionally use on html tags, , understand client/server paradigm , specifying.
is redundant tag implied control being asp.net control, or there underlying reason?
i've believed there more understanding can mix asp.net tags , html tags, , html tags have option of either being runat="server" or not.  doesn't hurt leave tag in, , causes compiler error take out.  more things imply web language, less easy budding programmer come in , learn it.  that's reason verbose tag attributes.
this conversation had on mike schinkel's blog between himself , talbot crowell of microsoft national services. relevant information below (first paragraph paraphrased due grammatical errors in source):
[...] importance of
<runat="server">more consistency , extensibility.if developer has mark tags (viz.
<asp: />) asp.net engine ignore, there's potential issue of namespace collisions among tags , future enhancements. requiring<runat="server">attribute, negated.
it continues:
if
<runat=client>required client-side tags, parser need parse tags , strip out<runat=client>part.
he continues:
currently, if guess correct, parser ignores text (tags or no tags) unless tag
runat=serverattribute or “<%” prefix or ssi “<!– #include… (...) also, since asp.net designed allow separation of web designers (foo.aspx) web developers (foo.aspx.vb), web designers can use own web designer tools place html , client-side javascript without having know asp.net specific tags or attributes.
Comments
Post a Comment