Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Upgrade effects on EnsureID() method

Status
Not open for further replies.

ochjings1

Programmer
May 4, 2005
4
0
0
GB
Following upgrade to 2005 beta 2, code that was previously fine is now producing an error:

Code:
Label errorLabel = new Label();
errorLabel.EnsureID();

"-> System.Web.UI.Control.EnsureID() is inaccessible due to its protection level"


Firstly - what is the change, I can't seem to find documentation, and also - is there ever a real need to use this method? Entering controls dynamically into a table. For now, if a control fails to build I insert an errorLabel. More than one in a table - should they have the EnsureID method called?

Thanks for your help,
Steve
 
>>EnsureID();
i tried a search for this in MSDN, came up with zilch. where did u get that code anyway???

Known is handfull, Unknown is worldfull
 

It seemed to make a lot of sense - x controls in the same container, prevent ID clashes by creating a unique one, but is seems to have been discontinued, or erased... or worse. Is there a standard method of avoiding these clashes without EnsureID?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top