我正在尝试使用脚本管理器检查我的路径,我的代码在 App_Code 中,这是我的代码:
public ReportDocument ReportCon(string path)
{
ReportDocument cryRpt = new ReportDocument();
ConnectionInfo info = new ConnectionInfo();
TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
Tables CrTables;
info.ServerName = "192.168.1.200";
info.DatabaseName = "Track4L";
info.UserID = "Developers";
info.Password = "dev01@pps";
ScriptManager.RegisterStartupScript(this, typeof(Page), "test", "alert('" + path + "');", true);
cryRpt.Load(path);
CrTables = cryRpt.Database.Tables;
foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)
{
crtableLogoninfo = CrTable.LogOnInfo;
crtableLogoninfo.ConnectionInfo = info;
CrTable.ApplyLogOnInfo(crtableLogoninfo);
}
return cryRpt;
}
但我收到以下错误:
Error The best overloaded method match for 'System.Web.UI.ScriptManager.RegisterStartupScript(System.Web.UI.Page, System.Type, string, string, bool)' has some invalid arguments D:\DMS\DocumentManagement\Track4L\App_Code\ReportConnection.cs 27 13 D:\...\Track4L\
我不知道这个问题将如何解决