Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a page with tab control. The first tab hosts data entry page in an Iframe to create a record and second tab has an Iframe which shows the page with gridview which shows all the saved/created records.

On the SAVE button in the first tab, I have assigned a javascript on Onclick event so it makes second tab active without refreshing whole page. In this function only the second tab's iframe is given src again where gridview page loads and brings the latest records from the database.
it very quick. The whole page with tab control doesn't refresh.

But I also want to save the record first and then switch to second tab. But I find if SAVE buttons server side saving takes time and before it complete the gridview page in the second tab is loaded and it doesnt show the latest created record.

So here how to save the record first and then call second tab through a javascript provided the page with the tab control doesnt refresh? (I think Ajaxpro can not be used here as it wont get the hold of controls in the data entry page to have values to save the record.)

Thanks,

Vijay
Posted

1 solution

Basically, you need to do a postback which first saves your record, THEN shows your grid with the updated data. Or, to do it with AJAX, you'd need to write code that catches the message back from the server and THEN navigates to the other page.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900