【发布时间】:2015-12-19 05:23:15
【问题描述】:
我的 asp.net mvc 5 项目中有以下文件夹结构。我可以在我的 cshtml 视图页面中使用 jquery 脚本调用和传递参数 OnSubmit() webmethod。
现在我想从 OnSubmit() webmethod 调用 ShowReport() void 方法 .this ShowReport() 方法我用来显示 RDLC 报告向导
我该怎么做
这是我的网络表单代码隐藏文件的摘要 Incomplete_Prodcut.aspx.cs
public partial class Incomplete_Prodcut : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
/// Method to show RDLC report
public void ShowReport()
{
//Reset
ReportViewer1.Reset();
//DataSource
DataTable dt = GetData(type.Text, category.Text, subsidary.Text, country.Text, dateHERE.Text);
.............
}
public DataTable GetData(string type, string category, string country, string subsidary, string dateHERE)
{
...............
return dt;
}
[WebMethod]
public static string OnSubmit(string type, string category, string country, string subsidary, string dateHERE)
{
return "";
}
}
【问题讨论】:
标签: c# asp.net-mvc webforms code-behind webmethod