页面中保存变量的问题
方法一:
private int FlowID;//窗体类变量
private void Page_Load(object sender, System.EventArgs e)
{
FlowID = Request.QueryString["FlowID"]!=null?Int32.Parse//(Request.QueryString["FlowID"].ToString()):0;
}
方法二
public void aa(){
ViewState["DocID"] = Convert.ToInt32(Request.QueryString["DocID"]);
}
请问哪个方式好?请说明下理由?谢谢