RptDoc.Load(Server.MapPath("~/CrystalReport.rpt"));
从下面的代码中,当我输入Server.MapPath时. 你给了解决方案 server.mapapth 的 system.web 命名空间. 即使我添加了名称空间 system.web ,但 server.mappath 都没有出现,请帮助我.是否有任何参考文献想要添加. 请帮我.我尝试几次. 这是我的代码,如下所示
from the below code,when i type Server.MapPath is not coming. u given the solution system.web namespace for server.mapapth. even though i add the namespace system.web the server.mappath does not comes please help me.is there any Reference want to add. please help me.i try several times . this is my code as follows
ReportDocument RptDoc = new ReportDocument(); RptDoc.Load(Server.MapPath("~/CrystalReport.rpt")); RptDoc.SetDataSource(dt); CrystalReportViewer1.ReportSource = RptDoc; CrystalReportViewer1.DataBind();从上面的代码
from the above code
RptDoc.Load(Server.MapPath("~/CrystalReport.rpt"));即使我添加了 system.web.ui 命名空间,此行 Server.MapPath 也不会出现.
this line Server.MapPath does not comes even though i add a system.web.ui namespace.
推荐答案尝试一下 System.Web.Hosting.HostingEnvironment.MapPath(〜") Try this System.Web.Hosting.HostingEnvironment.MapPath("~")
更多推荐
对于server.mappath我添加了命名空间system.web.ui,即使我没有添加server.mappath
发布评论