tags:

views:

46

answers:

3

When I create a new record by submitting an .aspx page the new record is not showing up. I have to navigate away from the page and back to it for the new data to show.

How do I refresh the data up reload??

+2  A: 

i think you need to call databind() on your grid. If that's an unlucky guess, we're going to need more context - can you please post your code (aspx and vb)

Rob Fonseca-Ensor
I have a form on a .aspx page. When I submit the form and create a new record it posts back to itself. However the new record is not showing. I have to navigate away from the page and back for the new record to show. I want to know how to refresh the data on reload. Not a grid. Just a form.
Anthony
ok great. Post us all of your code or we're just using our imaginations
Rob Fonseca-Ensor
Thanks, sorry for the slow response, but this was the answer I was looking for. Not a grid, a datalist. But none the less rebinding the datalist on post back did the trick.
Anthony
A: 

try Application.doEvents() right after you update the object in your code.

It's a shot in the dark really since we really don't know what you're code is doing, but if I ever have problems with something updating in VB.net, 9 times out of 10 calling that method fixes it.

AndyPerfect
A: 

You will need to call DataBind() on whatever object your using for your data connection, and then you will have to refresh the page unless your using AJAXified controls inside of an UpdatePanel that has a trigger set to your submit button. But without a code listing, knowing how your talking to the database, or anything of that sort, its really hard to give any code that will help.

Timbermar