Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

.NET Forum


You are currently viewing our .NET Forum as a guest. Please register to participate.
Login



Closed Thread
ClientScriptManager vs ScriptManager
Old 12-08-2009, 01:43 PM ClientScriptManager vs ScriptManager
Extreme Talker

Posts: 246
Trades: 0
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?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
View Public Profile
 
 
Register now for full access!
Old 12-08-2009, 02:40 PM Re: ClientScriptManager vs ScriptManager
Banned

Posts: 421
Location: Boston, MA
Trades: 1
Some people do not like to use the scriptmanager on the home page, to minimize the load time. That means no updatepanel on the home page.

other then that I dont see a problem using that on a masterpage or something like that.
webcosmo is offline
View Public Profile Visit webcosmo's homepage!
 
Old 12-08-2009, 03:10 PM Re: ClientScriptManager vs ScriptManager
Extreme Talker

Posts: 246
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
View Public Profile
 
Old 12-08-2009, 06:36 PM Re: ClientScriptManager vs ScriptManager
Banned

Posts: 421
Location: Boston, MA
Trades: 1
Quote:
Originally Posted by stbuchok View Post
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.
webcosmo is offline
View Public Profile Visit webcosmo's homepage!
 
Old 12-09-2009, 08:39 AM Re: ClientScriptManager vs ScriptManager
Extreme Talker

Posts: 246
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
View Public Profile
 
Old 12-23-2009, 03:38 AM Re: ClientScriptManager vs ScriptManager
skywind's Avatar
Skilled Talker

Posts: 74
Trades: 0
Quote:
Originally Posted by stbuchok View Post
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.
__________________

Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
skywind is offline
View Public Profile Visit skywind's homepage!
 
Old 04-10-2010, 11:59 PM Re: ClientScriptManager vs ScriptManager
Junior Talker

Posts: 1
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
trafficguru3 is offline
View Public Profile
 
Old 04-12-2010, 12:41 PM Re: ClientScriptManager vs ScriptManager
Extreme Talker

Posts: 246
Trades: 0
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?

if(!ClientScriptManager.IsClientScriptBlockRegiste red("scriptname"))
{
ClientScriptManager.RegisterClientScriptBlock(.... )
}
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
View Public Profile
 
Closed Thread     « Reply to ClientScriptManager vs ScriptManager
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26929 seconds with 12 queries