Home All Groups Group Topic Archive Search About

Script manager equivalent... How can I do?

Author
14 Feb 2007 1:31 PM
ThunderMusic
Hi,
I know there is something called (something like) Script Manager in asp.net
AJAX... What is the best way of achieving the kind of behavior it has?  I
mean, maybe I didn't understand it correctly, but as I understand it, many
(if not all) asp.net AJAX control gets the Script manager (in the Head of
the page) and send the script is must have in the page header...  I want to
achieve the same...  what is the best way?

Author
14 Feb 2007 1:36 PM
ThunderMusic
oups, sorry, I sent it inadvertadly... ;)  so, as I was saying, What is the
best way to achieve this?

1) Put it in the head, then in my controls, get the page and go through all
the controls to find the script manager, then keep a reference to it for
future use?
2) Create a web control that will also be a singleton (is it possible)
3) any other ideas?

thanks

ThunderMusic

Show quoteHide quote
"ThunderMusic" <NoSpAmdanlatathotmaildotcom@NoSpAm.com> wrote in message
news:%23fDl0wDUHHA.3996@TK2MSFTNGP04.phx.gbl...
> Hi,
> I know there is something called (something like) Script Manager in
> asp.net AJAX... What is the best way of achieving the kind of behavior it
> has?  I mean, maybe I didn't understand it correctly, but as I understand
> it, many (if not all) asp.net AJAX control gets the Script manager (in the
> Head of the page) and send the script is must have in the page header...
> I want to achieve the same...  what is the best way?
>
Are all your drivers up to date? click for free checkup

Author
14 Feb 2007 2:23 PM
Teemu Keiski
Hi,

why not using something that's already done? E.g use the ScriptManager
itself.

In your control you can use System.Web.UI.ScriptManager.GetCurrent
(shared/static method taking the Page in) to get the ASP.NET Ajax
ScriptManager on the Page (method returns null if it doesn't exist)

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net


Show quoteHide quote
"ThunderMusic" <NoSpAmdanlatathotmaildotcom@NoSpAm.com> wrote in message
news:%23KROqzDUHHA.996@TK2MSFTNGP02.phx.gbl...
> oups, sorry, I sent it inadvertadly... ;)  so, as I was saying, What is
> the best way to achieve this?
>
> 1) Put it in the head, then in my controls, get the page and go through
> all the controls to find the script manager, then keep a reference to it
> for future use?
> 2) Create a web control that will also be a singleton (is it possible)
> 3) any other ideas?
>
> thanks
>
> ThunderMusic
>
> "ThunderMusic" <NoSpAmdanlatathotmaildotcom@NoSpAm.com> wrote in message
> news:%23fDl0wDUHHA.3996@TK2MSFTNGP04.phx.gbl...
>> Hi,
>> I know there is something called (something like) Script Manager in
>> asp.net AJAX... What is the best way of achieving the kind of behavior it
>> has?  I mean, maybe I didn't understand it correctly, but as I understand
>> it, many (if not all) asp.net AJAX control gets the Script manager (in
>> the Head of the page) and send the script is must have in the page
>> header... I want to achieve the same...  what is the best way?
>>
>
>
Author
14 Feb 2007 3:01 PM
ThunderMusic
just because we're not using asp.net Ajax for our site... ;)  I used this
example because I looked at asp.net ajax briefly in the past months, but
we're not planning on using it right now...  but you answered my question
anyway, asp.net ajax script manager is used by getting a reference using a
static method...  that's what I wanted to know...

Thanks a lot

ThunderMusic

Show quoteHide quote
"Teemu Keiski" <jot***@aspalliance.com> wrote in message
news:E4F92BD1-15EE-4BB4-BAA0-4ED51BD54864@microsoft.com...
> Hi,
>
> why not using something that's already done? E.g use the ScriptManager
> itself.
>
> In your control you can use System.Web.UI.ScriptManager.GetCurrent
> (shared/static method taking the Page in) to get the ASP.NET Ajax
> ScriptManager on the Page (method returns null if it doesn't exist)
>
> --
> Teemu Keiski
> AspInsider, ASP.NET MVP
> http://blogs.aspadvice.com/joteke
> http://teemukeiski.net
>
>
> "ThunderMusic" <NoSpAmdanlatathotmaildotcom@NoSpAm.com> wrote in message
> news:%23KROqzDUHHA.996@TK2MSFTNGP02.phx.gbl...
>> oups, sorry, I sent it inadvertadly... ;)  so, as I was saying, What is
>> the best way to achieve this?
>>
>> 1) Put it in the head, then in my controls, get the page and go through
>> all the controls to find the script manager, then keep a reference to it
>> for future use?
>> 2) Create a web control that will also be a singleton (is it possible)
>> 3) any other ideas?
>>
>> thanks
>>
>> ThunderMusic
>>
>> "ThunderMusic" <NoSpAmdanlatathotmaildotcom@NoSpAm.com> wrote in message
>> news:%23fDl0wDUHHA.3996@TK2MSFTNGP04.phx.gbl...
>>> Hi,
>>> I know there is something called (something like) Script Manager in
>>> asp.net AJAX... What is the best way of achieving the kind of behavior
>>> it has?  I mean, maybe I didn't understand it correctly, but as I
>>> understand it, many (if not all) asp.net AJAX control gets the Script
>>> manager (in the Head of the page) and send the script is must have in
>>> the page header... I want to achieve the same...  what is the best way?
>>>
>>
>>
>

Bookmark and Share

Post Thread options