Problems with refreshing page contents

T

Tomasz

Hello,

I'm a newbie in ASP.NET and i have following problem.

I've got two separate pages. On the first one i have a list of workers,
which is read from mdb database and a button with event
Response.Redirect("SecondPage"); so after i press this button I'm
redirected to the second one.
On the second one there is a simple form and a button which is saving
form contents into the database and redirects me back to the first page
(with redirect method). The problem is when I'm going back to the first
page, this page is not reading data from database (where is new row
added), but it's showing previous contents. If i will press F5 in my
browser then, it will read new data. Maybe i should yous another method
than "Redirect" ? Or, what could be a problem ? Thanks in advance!
 
B

bruce barker \(sqlwork.com\)

by default the browser and proxy (if one) caches the pages. you can mark
the first page as non-cached, or decorate the redirict url b adding a dummy
arg.

Redirct(myurl + "?x=" + Guid..NewGuid().ToString());

-- bruce (sqlwork.com)
 
T

Tomasz

bruce said:
by default the browser and proxy (if one) caches the pages. you can mark
the first page as non-cached, or decorate the redirict url b adding a dummy
arg.

Redirct(myurl + "?x=" + Guid..NewGuid().ToString());

I tried this and few other things additionally, but still i can't see
any change. I tried to turn off caching, no i will try again to trace
my code, maybe there is other error ...
 

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

Top