Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6871501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:48:51+00:00 2026-05-27T03:48:51+00:00

Like the title says.. why ? I know why its required on the normal

  • 0

Like the title says.. why ?

I know why its required on the normal ASP.NET controls, there are numerous questions on SO about that.

But since you can only define .NET controls (no normal HTML markup) in the skin files, why is the runat="server" still required for every control in the skin file?

It has nothing to do with styles or themes.
Is there any reason why I still need ot add it to all controls in my skin files? Does anyone know what happens with it ‘behind the scenes’?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:48:52+00:00Added an answer on May 27, 2026 at 3:48 am

    Again, you have to understand how server side languages work.

    All ASP.NET tags are transformed to browser-understandable HTML (a browser has no notion of what an <asp:button> is, for instance) by a server side pre-processor before the page is rendered. This means that all controls/modules/anything served by ASP.NET that’s not just HTML needs to have these attributes.

    I venture that the pre-processor was written originally to know what it needed to operate on based on the presence of that attribute. Otherwise it would have to process every tag even if it did nothing. It could’ve been written to just look for the namespace, but that would require extra processing.

    A skin file is a special ASP.NET concept, for tags defined within the framework. Hence, it makes sense that these tags have to have the “runat=server”. MS could’ve written a special rule into their pre-processor such as “if it’s a skin file, assume it’s all ASP tags”…but such rules really don’t scale. Plus they’re bad documentation.

    As a web developer, you should understand which of your tags are actually HTML and which are convenience tags provided by the framework. The "runat=server" attribute makes that delineation explicit.

    You can add runat=”server” to plain HTML tags such as <input> but generally there’s little reason to and it’s a bad practice.

    For portability moving forward, you may want to consider moving away from skin files and leveraging CSS. Attributes are very verbose for setting styles, which makes the end rendered pages larger (taking longer to load, providing poor user experience) and un-semantic.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Like the title says... Is it required? I know most servers automatically send it
So, just like the title says, I need to create an application that gets
As the title already says, I'd like to know how to create a 1024x1024
Like the title says, I'm curious to know what state is contained in a
Like the title says, if anyone has the answer I would like to know.
As title says I'd like to know how to restart my iPhone app after
Like the title says I need to write a function that will sort a
As the title already says, I would like to know if it is somehow
Like the title says, I want to know what (int (*)()) in a C-define-function-call
As title says, is there any way to pull something like this up?: std::set<boost::shared_ptr<MyClass>>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.