I'm trying to work with some client-side scripting issues with an
ASP.NET application. I realize I've probably done something wrong, but
at the moment it looks to me like an inconsistency in the way
UniqueID property of the control to generate what will be the final
client-side reference. Normally, this works fine; I've tried it on
code that enables/disables certain buttons, text boxes, etc. So,
puffed up by my own success, I then tried to apply the same technique
indicating it doesn't recognize the identifier its being told to
But if I try to use this for a *radio button*, it fails:
// do something
I'll get a client-side error that the value is null, which isn't true.
The ASP.NET code that generates this is something like the following:
protected override void Render(HtmlTextWriter w)
w.Write("if (document.forms[\"" + RadioButtonName.UniqueID +
w.Write("// do something.");
In the debugger, if I replace "ContainerName:RadioButton" with
"ContainerName_RadioButton", (from the command window with a
debug.print statement) it *works* - just changing the colon to an
underscore. But the other syntax works everywhere else.
Am I missing something here, or is this just an inconsistency in the
Just my two cents :
Iím using Document.All("ControlID") And Iím using the ID property of the
control. (I already help some people that forget to add the ID attribute
to the control :-) )
Natty Gur, CTO
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114
Know the overall picture
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
|All times are GMT. The time now is 07:24 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.