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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top