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 / Caching / July 2004

Tip: Looking for answers? Try searching our database.

fragment caching problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joe - 26 May 2004 15:21 GMT
I have a custom control that generates client scripts and uses viewstate
This control is placed in a user control that is placed in my application pages
When I use OutputCache directive in the ascx (so that the control will not be generated each time), the client script and viewstate data of the custom control is not rendered, and this causes errors when using the page

What's the way to solve this problem
TIA
Jo
Mr. Dot Net - 15 Jul 2004 22:47 GMT
If you registered the JS by calling the parent page like this:
control.Page.RegisterClientScript etc..

Don't expect that the script will be there for you when it is loaded from
the cache since the code is never executed.

What you can do is put the script tag in the ASCX file itself.

> I have a custom control that generates client scripts and uses viewstate.
> This control is placed in a user control that is placed in my application pages.
> When I use OutputCache directive in the ascx (so that the control will not be generated each time), the client script and viewstate data of the custom
control is not rendered, and this causes errors when using the page.

> What's the way to solve this problem?
> TIA,
> Joe

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.