473,326 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Custom Controls

DFB
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!

--
DFB
Nov 17 '05 #1
1 1901
You can't switch off the prefix _ctl0_ in a control. But you can use the
client id like _ctl0_idCategories in javascript.

--
Regards,
Amal [MCP, MCS]

"DFB" wrote:
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!

--
DFB

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
6
by: Suzanne | last post by:
Hi all, I really hope someone out there can help me as I've been tearing my hair out on this one for a good while and I'm getting really frustrated now! My problem is this - my custom...
2
by: Suzanne | last post by:
Hi all, I'm reposting this message as I'm experiencing this problem more and more frequently : I really hope someone out there can help me as I've been tearing my hair out on this one for a...
2
by: J R M | last post by:
I've developed a custom control (it's basically a drop-down list and then a couple of textboxes to include meta-data for the selection) that I'm embedding into another custom control (the idea is...
6
by: | last post by:
I have made some user controls with custom properties. I can set those properties on instances of my user controls, and I have programmed my user control to do useful visual things in response to...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
1
by: rizwanahmed24 | last post by:
Hello i have created a custom control. i have placed two template controls on it. One is check box and second is picture box. The custom control also contain two picture boxes as property. These...
2
by: Ron | last post by:
I would like some more information on custom controls, what they can do and things like that, what you would use them for etc... Can anyone here share some examples of what you have used a custom...
1
by: Abdo Haji-Ali | last post by:
Previously I used to create user controls if I wanted to use a specific set of controls in multiple pages, however I want to deploy my control in other applications so I thought of creating custom...
5
by: gerry | last post by:
I am trying to create a custom container control that will only ever contain a specific type of control. At design time, when a control of a different type is added to the container I would like...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.