Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

Unregistering startup script

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
KBSTours - 03 Sep 2007 06:33 GMT
Hi,

I am using
Page.ClientScript.RegisterStartupScript

but couldn't find any way to unregister the registered script.

Is there a way to do that?

Signature

CTO
www.kbstours.com

Michael Nemtsev, MVP - 03 Sep 2007 06:46 GMT
Hello KBSTours,

There is no standard way for this, but the small trick is there http://hemant-vikram.blogspot.com/2005/11/unregister-startup-script-workaround.h
tml#links


---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour 

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

K> RegisterStartupScript
K>
KBSTours - 03 Sep 2007 07:09 GMT
Hello Michael,

I've actually read that.

In my case, I have several user controls which are trying to register the
same/similar startup scripts (basically windows.onload = function
windowsLoadEvent()
{
   do something here;
}

As you see all may have different purposes to run something on
windows.onload but as you know the last one written is the winner. So what I
want to do is th to keep the requests added to Page.Items and each time my
base function is called (all those user controls inherit from it) if it is
registered it will unregister and iterate from Page.Items to add all of them
together to the onload in 1 go.

Now as this is the case , I don't know when the last one will be called and
for many reasons I really do not want to do anything on the page level in
the prerender etc.  (I am using a portal application and I don't want to
alter it as newever version will override the old one and I will forgot
that)..

Soo, I need to unregister. Isn't there really a way?

Signature

CTO
www.kbstours.com

> Hello KBSTours,
>
[quoted text clipped - 9 lines]
> K> RegisterStartupScript
> K>

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.