How do I ensure that I always get the Page_Load event (but not have to reload images from the server

J

Joergen Bech

Scenario: One editnews.aspx page used for editing various types of
news, e.g.

editnews.aspx?NewsType=Business
editnews.aspx?NewsType=Fans

Trouble is: There is a combobox on this page, which is being
initialized in the Page_Load event (If Not Page.IsPostBack Then ...).
For one type, 10 items might be loaded into the box. For another,
maybe 20.

For various reasons, I *need* to have this Page_Load event fired
whenever I switch between the two types, but in this sequence of
events:

1. editnews.aspx?NewsType=Business -> Page_Load fired
2. editnews.aspx?NewsType=Fans -> Page_Load fired
3. editnews.aspx?NewsType=Business -> <nothing>

By putting the following line at the beginning of Page_Load:

Response.Cache.SetCacheability(HttpCacheability.NoCache)

I get the event to fire all the time.

Problem: I have a FreeTextBox editor on the page. After adding the
line above, the 27 icons used by the editor are reloaded from the
server every time the page is updated.

Is there anyway I can get the Page_Load event to fire *and* cache
the FreeTextBox icons (and other images?) on the client?

TIA,

Joergen Bech
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top