Can't refresh page after posting

G

Geof Wyght

Hello,
I have an asp.net page with a datagrid populated by a
query from an Access database. The datagrid has edit,
update, cancel, delete buttons using the OnEditCommand
property, and so on.

Below the datagrid, I also have a textbox, and an "Add"
button to run an "Insert Into" query.

In the page load event I get my data:
If Not Page.IsPostBack Then
Call GetLocations()
End If

Here's my problem: after successfully adding a record,
the page posts with the new text still in the text box.
To see the new record, I would expect to refresh (F5),
but when this happens, the same record is added again,
IsPostBack is true, and I don't see the new record. Of
course, I actually have 2 new records, but I couldn't
tell, unless I closed IE and opened the page. What am I
missing?
Thanks!
 

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,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top