Last post Nov 26, 2008 04:47 AM by Nai-Dong Jin - MSFT
Nov 20, 2008 10:45 AM|srulikk|LINK
I'm developing a site which contains lots of ajax and dynamic control loading.
I have several user and custom server controls which register startup client scripts using the ScriptManager.RegisterStartupScript method.
Usually it works just fine, but in some cases the script, which supposed to be rendered right before the </form> tag (because I have the LoadScriptBeforeUI property of the ScriptManager set to false), is rendered partially before the </form> tag and partialy
Does anyone encountered this kind of thing?
Nov 25, 2008 09:26 PM|Nai-Dong Jin - MSFT|LINK
From your description, it seems that some of the scripts appeared before the form closing tag and others after it, right?
Please make sure that you need to include opening and closing <script> elements around the script block string specified in the script parameter. Since this method
uses a key to identify the script block, the script block does not have to be emitted to the output stream each time it is requested by a different server control instance.
Nov 26, 2008 01:54 AM|srulikk|LINK
Thanks for your reply,
I always pass 'true' to the script block tags parameter of the RegsiterStartupScript method.
Is that what you meant?
Nov 26, 2008 04:47 AM|Nai-Dong Jin - MSFT|LINK
Yes, then the problem still exist?