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

  • Home
  • SEARCH
  • 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 6379941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:12:11+00:00 2026-05-25T02:12:11+00:00

The default value of ClientIDMode for a page is AutoID. The default value of

  • 0

The default value of ClientIDMode for a page is AutoID. The default
value of ClientIDMode for a control is Inherit. If you do not set
ClientIDMode for a page or for any controls on the page, all controls
will use the AutoID algorithm.

This is from msdn. But when I created a web application in ASP.NET 4 or even 3.5, all of the ids of the control are what I have written for them. They are not generated by the autoId algorithm. Then I tried to manually add clientIDMode=”AutoID” to the controls, it also doesnt work what I was expected. So what is the problem ? Is there any rule to make it available ?

Thanks in advance,

EDITED

This is in .aspx page

<div>
    <asp:Panel ID="Panel1" runat="server">
        <asp:Panel ID="Panel2" runat="server">
            <asp:Panel ID="Panel3" runat="server">
                <asp:Panel ID="Panel4" runat="server">
                    (:
                </asp:Panel>
            </asp:Panel>
        </asp:Panel>
    </asp:Panel>
</div>

This is output:

<div id="Panel1">
        <div id="Panel2">

                <div id="Panel3">

                    <div id="Panel4">
                        (:
                </div>

        </div>

    </div>
</div>
  • 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-25T02:12:12+00:00Added an answer on May 25, 2026 at 2:12 am

    The reason you are getting all your Id’s coming out the way you are is because there is no reason for the .NET framework to change them.

    If you had placed your Panel’s within a Repeater control, then they would all change to avoid multiple ID’s of the same name.

    Example (not correct markup):

    <asp:Repeater id="repeater1" runat="server">
      <template>
          <asp:Panel id="Panel1" runat="server">
              <asp:Panel id="Panel2" runat="server">
    
              </asp:Panel>
          </asp:Panel>
      </template>
    </asp:Repeater>
    

    Your HTML which is generated from this would show that the Panel id’s have been changed to inherit from the containing control. Something like repeater1_ct100_Panel1

    The same happens when you are using Master Pages, Content Holders, and DataBound Controls. .NET updates the ID’s to avoid multiple ID’s of the same name.

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

Sidebar

Related Questions

I want to assign a default value if url parameter is not set. Something
How to set default value for a lookup column (not in code) when user
Most forums do not specify any default value for the ID column. I wonder
When I set a default value formula for a date parameter in SSRS, such
How do you set a default value for a MySQL Datetime column? In SQL
How can I set default value for DateTime in optional parameter? public SomeClassInit(Guid docId,
How to put default value to input and when user press enter it will
Whenever I attempt to set the default value of an optional parameter to something
I would like to set a default value to a variable SELECT ID, VALUE
Is it possible to set a default value for a variable argument list 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.