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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:08:47+00:00 2026-05-13T18:08:47+00:00

If in the markup you declare a control like this: <asp:Label runat=server AssociatedControlID=txtSomeInput>Some Input:</asp:Label>

  • 0

If in the markup you declare a control like this:

<asp:Label runat="server" AssociatedControlID="txtSomeInput">Some Input:</asp:Label>
<asp:Textbox id="txtSomeInput" runat="server" />

Does leaving out the ID from the label control change anything in regards to Viewstate or the Page/Control life cycle? Does it just get some generated ID? Obviously it cannot be referenced in the code-behind at design time (well at least not by the programmer)…Just curious as to if this has any side effects (or tangible benefits)?

Further, I would presume if this control cannot be referenced at design time it can’t really be changed in a way that would add any information to viewstate…yet the runat tag allows the AssociatedControlID to be decided (master page crap ids for example) thus not having to have a html label with a <%# %> to write the clientId??

thanks!

  • 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-13T18:08:47+00:00Added an answer on May 13, 2026 at 6:08 pm

    It makes no difference from a functionality perspective. Elements which require an ID to function properly will auto-generate one. It does make referencing the control by name in the code-behind difficult, but still possible, it just requires manually finding it and wiring it.

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

Sidebar

Related Questions

All, this is my code //declare string pointer BSTR markup; //initialize markup to some
I have some markup like this: <p><a id=1 href=#>Link 1</a></p> <p id=1show class=starthidden>Hi! I
Markup <asp:GridView ID=GridView1 runat=server AutoGenerateColumns=False> <Columns> <asp:BoundField DataField=insured_first_name HeaderText=First Name /> <asp:BoundField DataField=insured_first_name HeaderText=Middle
Markup: <asp:GridView ID=GridView1 runat=Server> <Columns> <asp:BoundField DataField=status_column HeaderText=Status /> <asp:BoundField ... <asp:BoundField ... </Columns>
I have markup like this: <p>one two three four</p> And I want to use
I have some markup for a popup menu that works in firefox but not
I have a line of C# in my ASP.NET code behind that looks like
I am trying to create a custom datasource control. I have been following this
I have created a Silverlight User Control. The markup is: <StackPanel Grid.Row=4 Grid.Column=0 Orientation=Horizontal
The markup required by jQuery UI Tabs is like following... <ul> <li>Tab1</li> <li>Tab2</li> <li>Tab3</li>

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.