Last post Jul 06, 2017 02:41 AM by NJ2
Jul 05, 2017 09:54 PM|NJ2|LINK
I have a page with many controls including several GridView control. For one of the Gridview; I bring up a window popup and add new records to the database. How do I refresh that Gridview for which I have added the new records? I used window.opener.document.location.href
in Popup window but it refreshes the entire page causing some data loss on the page for other controls.
Jul 05, 2017 10:05 PM|JBetancourt|LINK
the simplest way is to use jQuery ajax:
$( "#result" ).load( "ajax/test.html" );
or go the microsoft way with ASP.NET Ajax: https://docs.microsoft.com/en-us/aspnet/web-forms/overview/older-versions-getting-started/aspnet-ajax/understanding-partial-page-updates-with-asp-net-ajax
Jul 05, 2017 10:12 PM|NJ2|LINK
http://api.jquery.com/load/ seems to be unreachable. The Microsoft way seems to be a little complicated for me.
Jul 05, 2017 10:31 PM|JBetancourt|LINK
Jul 05, 2017 10:35 PM|NJ2|LINK
page errors out
Jul 06, 2017 12:43 AM|NJ2|LINK
Could someone please help me resolve this issue?
I want to refresh a Gridview but need to keep data on the rest of the controls. e.g. If I have a Gridview1, TextBox1, Gridview2, TextBox2; and they all have data in it. I click on a link which open up a popup .aspx page and add some data to a table which
is related to Gridview1. When I close this popup .aspx page; I want new data to appear in Gridview1.
Jul 06, 2017 01:07 AM|Kelmen|LINK
try create a button on the main page, when onclick, the server will perform databind/refresh the gridview, test it
then modify the client script, when the popup closed, invoke this button.click
and set this button to kind of invisible but still exist in the page
Jul 06, 2017 02:41 AM|NJ2|LINK