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 7879403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:53:36+00:00 2026-06-03T03:53:36+00:00

How would I go about finding on my ASPX page (from codebehind) and then

  • 0

How would I go about finding on my ASPX page (from codebehind) and then adding the attribute “runat=server” to it?
I have tried using Page.header.attributes.add(...) and(HtmlHead) Page.FindControl("head"); The second one obviously won’t work as the Head tag doesnt have an ID.

I can’t work out how to change this property and I can’t change or add any additional code to the ASPX page – like ID’s etc.

  • 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-06-03T03:53:38+00:00Added an answer on June 3, 2026 at 3:53 am

    Unfortunately, this is not possible.

    The runat="server" attribute allows the code behind to “see” the element it decorates. If that attribute is not present in the page markup, the element will not be accessible from code behind and you will not be able to manipulate it.

    The only way to achieve what you want is to add runat="server" (and possibly an ID attribute) to the element in the page markup. Only then will you be able to add other attributes, event handlers, etc. from the code behind.

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

Sidebar

Related Questions

How would I go about finding the largest objects in a SQL Server database?
I have the relation instructor(ID, name, dept_name, salary). How would I go about finding
How would you go about finding out how much memory is being used by
What would be the best way to go about finding what the active control
Anyone have any idea how I would go about converting a timestamp in milliseconds
How would one go about finding the minimum value in an array of 100
How would I go about finding the unix timestamp of midnight of the previous
How would i go about finding the number of 'zero' bits in C++. Suppose
How would you go about finding a string constant that is not HTML-safe? It
How would I best go about finding duplicate key names in an array in

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.