Results 1 to 6 of 6

Thread: [RESOLVED] [2005]changing the ID of a control doesn t reflect the changes in code behind

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2006
    Posts
    589

    Resolved [RESOLVED] [2005]changing the ID of a control doesn t reflect the changes in code behind

    does this happen to u sometimes:

    After u change the ID of a server control in the aspx view from let's say: "ControlId" to "NewControlId", then and u change the ID in all the code behind to take into consideration the new ID value, when we builde, those changes sometimes don t reflect during the build, and we get the error for example:

    Name 'NewControlId' is not declared.

    or something like that

    any idea pls?

    It happens a lot for example with AjaxToolKitControls may be with regular controls as well
    Thanks a lot for your help.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005]changing the ID of a control doesn t reflect the changes in code behind

    Sometimes it takes Visual Studio a while to 'catch up' to the changes you made. Do the build errors go away after a while or do you have to manually edit it in the designer.cs?

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2006
    Posts
    589

    Re: [2005]changing the ID of a control doesn t reflect the changes in code behind

    Quote Originally Posted by mendhak
    Sometimes it takes Visual Studio a while to 'catch up' to the changes you made. Do the build errors go away after a while or do you have to manually edit it in the designer.cs?
    I never thought about changing designer.cs, but I think I usually don t give it enough time may be. I ll give it enought time, next time i ll give u the exact code if u don t mind.
    Thnx
    Thanks a lot for your help.

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005]changing the ID of a control doesn t reflect the changes in code behind

    Do the build errors go away after a while or not?

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2006
    Posts
    589

    Re: [2005]changing the ID of a control doesn t reflect the changes in code behind

    i ll check next time I SUFFER from that pb
    Thanks a lot for your help.

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005]changing the ID of a control doesn t reflect the changes in code behind

    Then hopefully you won't be visiting this thread again. Good luck.

Posting Permissions

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



Click Here to Expand Forum to Full Width