C
Craig
Hello
I've created a custom web control using the INamingContainer interface.
The custom web control has four textboxes and one button. When the button
is clicked, a new window is opened and a list is displayed. When an item
on the list is selected, the textboxes are populated and the new window
is closed.
This all works fine (using window.opener in javascript to reference the
textboxes from the new window), except that the client ID of the
textboxes changes on different pages from being mycontrol_mytextbox to
mycontrol:mytextbox (which breaks my javascript code, which is hardcoded
to put an underscore between the control name and the textbox name).
I figure I have a few approaches to solve this;
1. Find out if there is some way of knowning what separator has been
used.
or
2. Find some way to force the separator to always be one or the other.
or
3. Find a more reliable way to reference the textboxes from hte new
window.
I have to use INamingContainer because there could be more than one
control on the page and the new window has to know which control to
populate.
Thanks for your help.
Craig
I've created a custom web control using the INamingContainer interface.
The custom web control has four textboxes and one button. When the button
is clicked, a new window is opened and a list is displayed. When an item
on the list is selected, the textboxes are populated and the new window
is closed.
This all works fine (using window.opener in javascript to reference the
textboxes from the new window), except that the client ID of the
textboxes changes on different pages from being mycontrol_mytextbox to
mycontrol:mytextbox (which breaks my javascript code, which is hardcoded
to put an underscore between the control name and the textbox name).
I figure I have a few approaches to solve this;
1. Find out if there is some way of knowning what separator has been
used.
or
2. Find some way to force the separator to always be one or the other.
or
3. Find a more reliable way to reference the textboxes from hte new
window.
I have to use INamingContainer because there could be more than one
control on the page and the new window has to know which control to
populate.
Thanks for your help.
Craig