-i have 2 gridviews, called GridViewleft and Gridviewright on a asp.net page that uses Master pages.
-GridViewLeft shows list of items e.g. grocery items
-gridviewRight shows list of selected items with quantity e.g. grocery items and quantity
-when a row item is clicked in GridViewleft, i have a jquery popup that displays the grocery item of the row that was clicked and a dropdown list for selecting quantity.
-on clicking Ok in the popup, the item is added to GridViewRight.
-the problem is, it is doing a full postback instead of an asyncPostback inspite of using Updatepanels.
here is how it works.
- after the popup is closed, the grocery item and the quantity are sent to the server and added to a session holding the data in GridviewRight.
- after the session is successfully updated with the selected value the client is notified and then i'm calling from the client __doPostBack('gridviewleft', '').
Please help as to how i could get the async featue to work?
Amit ChoudharyPosted Aug 8, 2011, 2:14 AM
{
var prm = Sys.WebForms.PageRequestManager.getInstance();
if( !Array.contains( prm._asyncPostBackControlIDs, eventName) )
{
prm._asyncPostBackControlIDs.push(eventName);
}
if( !Array.contains( prm._asyncPostBackControlClientIDs, eventName) )
{
prm._asyncPostBackControlClientIDs.push(eventName);
}
__doPostBack( eventName, eventArgs );
}
This will not postback ur page but will perform an async postback.
Read complete article here.
Thanks.