貌似1,2楼的方法都可以,请问楼上各位,this.getServletContext().getRealPath()这个在.net中可不可以用啊,这个是我在jsp中学到的??? 还有,我显示出路径下面最后一句为啥提示错误?(The control must be in the control tree of a page. Parameter name: control) string a = Server.MapPath("~/SONG/a.mp3"); UpdatePanel udp=new UpdatePanel(); ScriptManager.RegisterStartupScript(udp,typeof(UpdatePanel),"d", "alert(a);",true);
还有,我显示出路径下面最后一句为啥提示错误?(The control must be in the control tree of a page.
Parameter name: control)
string a = Server.MapPath("~/SONG/a.mp3");
UpdatePanel udp=new UpdatePanel();
ScriptManager.RegisterStartupScript(udp,typeof(UpdatePanel),"d", "alert(a);",true);