Hi my current system has a screen where the user can input a value into a table using a stored proc. The newly input item is then shown inside a datagrid that is nested within a DIV within the site.master page so it shows on ever webpage. However when on the input screen after the user has clicked the insert button and the item has been saved it looks as if the page is being refreshed but the datagrid within the site.master is not updated.
Is there any way that i can get this to update after the insert has happened without navigating to a different page?
Thanks Boldonglen.
Loading


NarayanRank #8,477 · 221 reputationPosted Apr 19, 2012, 3:13 AM EDT
Now in content page add
<%@ MasterType VirtualPath="~/MasterPage.Master" %>
Now you can access that public method by Master.MethodName inside the conent page, call it after insert or edit or delete.
You are done.
Glen Robson46 reputationPosted Apr 19, 2012, 4:00 AM EDT
This is the div in my site.master
Cart
£<%# GetUnitPrice(decimal.Parse(Eval("Price").ToString()), Convert.ToInt32(Eval("Quant"))) %>
Total
£<%# GetTotal().ToString() %>
© 2011-12 Geordie Jeans. All Rights Reserved. - Admin
This is the div i want to be updated without refreshing
Below is the product.aspx.cs where the stored proc is called:
protected void btnAddBsk_Click(object sender, EventArgs e)
{
int added = project1.Classes.Product.InsertItem(id.text, name.text);
result.Text = added.ToString();
}
Once i click that button it updates the table and the page is refreshed however the datagrid within the div is not updated.
Sorry if i am miss understanding your point.
Boldonglen