I've run some tests and have read a few articles and still can't figure out what I need to know.
Is there a reason that you would want to use the ClientScriptManager instead of always using the ScirptManager to Register a Startup script or script block (Assuming there is a ScriptManager on the page).
I understand that using the ScriptManager is for pages that use UpdatePanels but is there anything that makes it wrong to use it if there are no UpdatePanels on the page.
If it make no difference (as I can't find anything to say otherwise), why not use ScriptManager to reigster scripts all the time?
Thanks for the reply but that doesn't really answer my question.
My question is, if there is NO UpdatePanel is there an issue using ScriptManager instead of ClientScriptManager.
Sorry didn't the question earlier.
I think those are intended for different purpose. ClientScriptManger is for controlling client scripts scripts from the server script(code page) . ScriptManger is for Ajax.
So I dont think it would any issue using a ClientScriptManager when there are no UpdatePanel on a page.
Thanks again for the reply, but again you have not read the question clearly.
If there is NO UPDATEPANEL is there an issue with using the SCRIPTMANAGER instead of the ClientScriptManager to register scripts (whether it be a startupscript or a scriptblock). I really don't know how much clearer I can make this question.
From the tests I've conducted there is no issue, but I want to know if there are any known issues that I haven't accounted for.
Thanks again for the reply, but again you have not read the question clearly.
If there is NO UPDATEPANEL is there an issue with using the SCRIPTMANAGER instead of the ClientScriptManager to register scripts (whether it be a startupscript or a scriptblock). I really don't know how much clearer I can make this question.
From the tests I've conducted there is no issue, but I want to know if there are any known issues that I haven't accounted for.
The answer is yes, SCRIPTMANAGER can do it. But it will cost more resource or high load.
There are times when you don't want to be re-registering client script because it would cause duplication errors. We experienced several of these using the earlier version of Atlas because script includes and blocks were being registered multiple times. As a result of this we had the same variables being declared twice etc. We developed a workaround to that by being more selective about when we registered the script - ie, only do it when we are not posting back, not partial rendering etc.
It's funny how no one actually seems to try to understand the question besides Skywind (thanks by the way, that was exactly the info I was asking for).
TrafficGuru3 why wouldn't you check to see if the script was registered before registering the script?