omitting runat="server" attribute

Results 1 to 2 of 2

Thread: omitting runat="server" attribute

  1. #1
    Join Date
    Dec 1969

    Default omitting runat="server" attribute

    All my aspx tags are runat="server". Can I toggle some global setting in my page or in some control panel that will allow me to leave the runat="server" off my tags???<BR><BR>Instead of ...<BR><BR>&#060;x8:sometag runat="server" /&#062;<BR><BR>I&#039;d like to simplify to ...<BR><BR>&#060;x8:sometag /&#062;<BR><BR><BR>Why can&#039;t I define the x8 namespace as runat="server" by default rather than having to specify it on each and every tag????

  2. #2

    Default RE: omitting runat=

    Uh, I don&#039;t think so.<BR><BR>As a quick answer: it would be more difficult to use namespaces in the markup that is not runat=server.<BR>Would you want every P tag to need runat=client?<BR><BR>If you put your controls onto the toolbar, you can use the toolboxData attribute on your class. You can also put stuff into the class (or better it&#039;s designer) to ensure that the runat=server is present.<BR>[ToolboxData("&#060;x8:sometag runat=&#039;server&#039; /&#062;")]<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts