Saturday, March 24, 2012

Is a ScriptManager required in every page?

Hi there,

Is there a way to avoid adding a ScriptManager control to every page, just to set the EnablePartialRendering to true? Maybe the partial rendering setting can be configured in Web.Config or somewhere else.

Thanks,

-BentonAgreed. It would be nice to only have to add the ScriptManager in 1 place
instead of every page. I can also understand the other side which says that
by having the ScriptManager in each page, you only add it where it is
needed. However, having it by default if I create an "Atlas" web project
would be a great thing.

Wally

wrote in message news:1201622@.66.129.67.203...
> Hi there,
>
> Is there a way to avoid adding a ScriptManager control to every page, just
> to set the EnablePartialRendering to true? Maybe the partial rendering
> setting can be configured in Web.Config or somewhere else.
>
> Thanks,
>
> -Benton
>

Its not that simple. ScriptManager does a whole lot more than provide a way to enable partial rendering. It orchestrates the entire process by hooking into the page lifecycle in very interesting ways. It also provides a way to define script and script references (typically these are per page, and the config mechanism for per-page settings via location tags is in my opinion really ugly and non-designable).

Scriptmanager also provides APIs used at runtime to make it possible to generate the desired rendering. See my post:http://www.nikhilk.net/AtlasScriptManager.aspx.

The lifecycle bits and APIs could theoretically be implementated via a base AtlasPage class... but this is much more heavy handed approach than adding a control - surely you don't want to have to rebase all your existing page classes from a new base (esp. hard without multiple inheritance)

Hope that explains the current design. I agree if all it did was provide that property, a config option would be just as fine (though in an ideal world you'd want all that on the <pages> section, and in the Page directive, which cannot be done until System.Web is rev'd)


What about putting it in a Master Page..

A.


I've never been able to use Atlas in Masterpages, so I don't know if that will work at this time.


I have the same problem... Do you think it′s an individual configuration problem or it′s an ATLAS problem itself?
Hi,

could you give some examples of the issues you are having with MasterPages?

No comments:

Post a Comment