J
Jim Corey
I'm experimenting with a code generator that creates
an html page which includes a lot of javascript that
modifies (for example) input boxes on the page.
I can paste the html into an aspx page, change some input boxes to asp
labels and the javascript can still work because the id's for the labels
still match the id's that
are referenced in the javascript.
I'd like to paste the html into an ascx control, but
here there will be a problem, since the id's are changed
when the page is rendered.
So... the question is
1. Is there a way to programmatically control the id's that are
generated? The clientID property is read-only,
so I would guess not.
2. A large amount of javascript has been generated. I could paste it
somewhere, modify it at run-time to change all the id's to match the
generated ones, then use RegisterClientScriptBlock. Where would be a
likely place to keep this? If there was a way to leave it in the ascx
html and then modify if at Page_Load, then I would have a working
scenario.
TIA,
Jim
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
an html page which includes a lot of javascript that
modifies (for example) input boxes on the page.
I can paste the html into an aspx page, change some input boxes to asp
labels and the javascript can still work because the id's for the labels
still match the id's that
are referenced in the javascript.
I'd like to paste the html into an ascx control, but
here there will be a problem, since the id's are changed
when the page is rendered.
So... the question is
1. Is there a way to programmatically control the id's that are
generated? The clientID property is read-only,
so I would guess not.
2. A large amount of javascript has been generated. I could paste it
somewhere, modify it at run-time to change all the id's to match the
generated ones, then use RegisterClientScriptBlock. Where would be a
likely place to keep this? If there was a way to leave it in the ascx
html and then modify if at Page_Load, then I would have a working
scenario.
TIA,
Jim
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!