关于成员与类的疑惑
public partial class news : System.Web.UI.Page
{
public String newsid = Request.Params[ "Id "];
}
非静态的字段、方法或属性“System.Web.UI.Page.Request.get”要求对象引用
在Page_Load()中声明String newsid = Request.Params[ "Id "]; 不出错.
在Page_Load()中声明为 protected static String newsid = Request.Params[ "Id "]; 也出错