高手请指教一下!
我在做一个更改新闻的内容的时候遇到的问题:
public abstract class updatenews : System.Web.UI.UserControl
{
private string NewsId;
private string newstitle;
private string newsclassid;
private void Page_Load(object sender, System.EventArgs e)
{
if(!Page.IsPostBack)
{
NewsId = Request.QueryString["NewsId"];
NewsTitle = ......//从数据库中得到;
newsclassid= ....//从数据库中得到;
}
}
//更新记录
public void Button1_Click(object sender, System.EventArgs e)
{
//为什么这里得不到在Page_Load中NewsId、newsclassid的值呢?
//我不想用ViewState["NewsId"]的方式做,请问如何解决呢???
}
}