在我的c#代码中,我添加了Response命令来显示属性:
var c = "some text";
Response.Write(string.Format("{0}", c));
Response.End();
这是方法:
public Dictionary<string, string> GetMarkupFeatures()
{
//Hashtable features = new Hashtable();
Dictionary<string, string> features = new Dictionary<string, string>();
MgResourceIdentifier featureSourceId = new MgResourceIdentifier(libraryPath + this.GetMarkupName() + ".FeatureSource");
var opt = new MgFeatureQueryOptions();
var filter = GetParameter(args, "WHERE");
if(!string.IsNullOrEmpty(filter))
{
opt.SetFilter(filter);
}
var ftr = features.OrderBy(x=>x.Value).ToDictionary(x=>x.Key, x=>x.Value);
var c = "some text";
Response.Write(string.Format("{0}", c));
Response.End();
return ftr;
}
当我运行代码时,我收到此错误:
描述:编译服务此请求所需的资源时发生错误。请查看以下特定错误详细信息并适当修改源代码。
编译器错误消息:CS0038:无法通过嵌套类型“ASP.data_editdata_aspx.DataEditor”访问外部类型“System.Web.UI.Page”的非静态成员
在这一行:
Response.Write(string.Format("{0}", c));
在添加Response命令时,我知道为什么会出现上述错误?