Naming controls problem

  • Thread starter Thread starter Nikolay Anestev
  • Start date Start date
N

Nikolay Anestev

Hi all. I have the following problem: In an ASP.NET (C#) application i wrote
some client-side script which works with some of the page controls. When the
page content is rendered i see that some of the controls' ids have been
prefixed with "_ctl" and this caused errors in my script. I'm sure my
controls' ids are unique so i don't want the renderer to modify them. Is it
possible to turn this naming feature off?
Please advise.
Best regards.

Nikolay Anestev
 
no. your best bet is to render the client script from the code behind, and
use the UniqueID property of the control, to get the control name.

-- bruce (sqlwork.com)
 
Thank you for your advise. But there is something more. The name for the
form is changed to "_ctl0:ctl0" and this causes errors in the automatically
generated sripts for the post back.
I can't prevent this.
Regards.

Nikolay
 
Back
Top