Custom Controls

G

Guest

I have created a custom control which contains an asp:dropdown inside it and
embedded my custom control in my web page.

I am accessing this dropdown via javascript.

The Problem: when this asp:dropdown control was embedded directly in my
webpage ... my javascript call to reference this dropdown worked (javascript
referenced call "document.all.idCategories").

BUT NOW ... because I have embedded this asp:dropdown id=idCategories within
my user control, the compiler has prepended it with a prefix id of _ctl0_, so
my javascript references to it no longer work.

HOW do I switch off this prepended prefix of _ctl0_ ... I did it before many
years ago .. but can't remember.

:|

Thank you in advance, frustruated!
 
G

Guest

You can't switch off the prefix _ctl0_ in a control. But you can use the
client id like _ctl0_idCategories in javascript.
 

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

Top