.NETGURU
@OutputCache interferes with radio button list's AutoPostBack
Messages   Related Types
This message was discovered on microsoft.public.dotnet.languages.jscript.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...

Peter G (VIP)
I'm having a problem with a radio button list which uses its AutoPostBack
feature to build a drop down list at run time. If I use the <%@ OutputCache
Duration="30" Location="Server" VaryByParam="none" %> to cache my form the
list's SelectIndexChanged causes the page to refresh to the state it was in
upon the first change (ie. the first auto-postback event). So, if I fill in
some of the form and select a radiobutton from the list and then change some
other part of the form and generate another postback the page refreshes to
the state it was in on the fist postback.

Any ideas or soultion are greatly appreciated!
Reply to this message...
 
    
bruce barker
if you cache the page, the viewstate is not kept current. you should turn
off viewstate support on the page (or any cached page). as SelectIndexChange
will no longer fire, you will have to detect it yourself.

hint: storing prev value in a temp field will also not work due to the
cache.

-- bruce (sqlwork.com)

"Peter G" <Peter Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Peter G (VIP)
Cheers Bruce. Tried disabling viewstate and same thing was happening. Then I
took out the @OutputCache directive and the SelectedIndexChanged still fired
and was caught by all list buttons clicked but the first one. Not sure if
this was what you were alerting me to so as to detect it myself.

Doesn't look like its going to work so I'm thinking of going about it not
using the cache to store the state by saving the info on the session in a
Page.Unload event handler and reloading it on Page.Load unless I've missed
something in your solution. I can provide code if you'd like to see what's
going on.

Regards,

Peter Keyes.
email:Click here to reveal e-mail address

"bruce barker" wrote:

[Original message clipped]

Reply to this message...
 
 
System.Web.UI.Page




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification