简体   繁体   中英

How do I force a page to refresh the data upon reload after entering new record

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??

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)

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM