What if you really want to output something like <asp:xyz> ? For example, if you want to create an XML document with namespaces, you can use this template without runat="server" , for example:
<root xmlns="..." xmlns:asp="..."> <asp:GridView> <name><%= Request["name"] %></name> </asp:GridView> </root>
Although I agree that this may not be the usual case, this is at least a good reason to require runat="server" in the first place, rather than just accepting it. However, it is not always very clear where you want to indicate it and where you do not want to. Note that there are also HtmlControls . In addition, you can also define your own prefixes. However, I personally believe that VS IntelliSense is designed to not interfere with normal typing. That is, it never works like this: "I think you need it most of the time. In 1% of cases you did not do this, manually delete it."
Mehrdad afshari
source share