语句:
Server.Execute("http://abc.myhomepage.com/info.aspx");
调试时出现:
找不到类型或命名空间名称“Server”(是否缺少 using 指令或程序集引用?)已经在项目中引用了System.Web.dll
请指教是什么原因?
Server.Execute("http://abc.myhomepage.com/info.aspx");
调试时出现:
找不到类型或命名空间名称“Server”(是否缺少 using 指令或程序集引用?)已经在项目中引用了System.Web.dll
请指教是什么原因?
并添加System.web.dll的引用
如果你在一个没有从Page类继承的类中执行这条语句肯定会出错,应该使用
HttpContext.Current.Server.Execute("http://abc.myhomepage.com/info.aspx");
System.Web.UI.Control
System.Web.UI.TemplateControl
System.Web.UI.Page[Visual Basic]
Public Class Page
Inherits TemplateControl
Implements IHttpHandler