【发布时间】:2017-11-11 17:54:48
【问题描述】:
我在母版页上有一个方法(非静态),将从内容页 Method(static WebMethod) 调用。 例如 母版页:
public partial class User : System.Web.UI.MasterPage
{
public void loadcart()
{
//some code here that i will a div
}
}
内容页面:
public partial class Menu : System.Web.UI.Page
{
[webMethod]
public static void Order()
{
// some code here
// call Master page method from here
}
}
Order()(内容页面方法)将从 Jquery ajax 中调用,loadcar()(母版页函数)将在 Order() 函数中调用。
我需要从内容页面调用母版页方法。请给我一些解决方案。
有什么想法吗?
【问题讨论】: