Hi, I keep having to write bits of javascript that use the following:
document.getElementById("<%=somecontrolfield.ClientID%>");
Now, this should be ok, BUT it appears that master pages do not like it at all. I get a runtime error saying "could not find somefield" if I try to use the above in content pages.
In the meantime I have reverted to doing this:
document.getElementById("ct100_ContentPlaceHolder1_somedetailsview_somecontrolfield");
Now this works, but it could obviously get broken if the masterpage changes and I would rather use the first code. Is this possible with content/master pages? I can't find an answer and seem to be needing one quite a lot for radajax things like radwindow etc.
Thanks,
Matt
document.getElementById("<%=somecontrolfield.ClientID%>");
Now, this should be ok, BUT it appears that master pages do not like it at all. I get a runtime error saying "could not find somefield" if I try to use the above in content pages.
In the meantime I have reverted to doing this:
document.getElementById("ct100_ContentPlaceHolder1_somedetailsview_somecontrolfield");
Now this works, but it could obviously get broken if the masterpage changes and I would rather use the first code. Is this possible with content/master pages? I can't find an answer and seem to be needing one quite a lot for radajax things like radwindow etc.
Thanks,
Matt