fid=this.Request.QueryString["fid"];
this.ViewState["fid"]=fid;

解决方案 »

  1.   

    namespace AnccOa.inc
    {
    /// <summary>
    /// ShowPic 的摘要说明。
    /// </summary>
    public class ShowPic : BasePage
    {

    private void Page_Load(object sender, System.EventArgs e)
    {
    // 在此处放置用户代码以初始化页面
    int fid;
    fid=this.Request.QueryString["fid"];
    this.ViewState["fid"]=fid;

    //this.JsIsNull("tstsat",test);
    } #region Web 窗体设计器生成的代码
    override protected void OnInit(EventArgs e)
    {
    //
    // CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
    //
    InitializeComponent();
    base.OnInit(e);
    }

    /// <summary>
    /// 设计器支持所需的方法 - 不要使用代码编辑器修改
    /// 此方法的内容。
    /// </summary>
    private void InitializeComponent()
    {    
    this.Load += new System.EventHandler(this.Page_Load); }
    #endregion
    }
    }
      

  2.   

    this.Request.QueryString("fid");
    ->this.Request.QueryString["fid"];this.ViewState("fid")
    ->this.ViewState["fid"]
      

  3.   

    谢谢各位阿以前老用vb.net写,这次改c#,以后还有麻烦大家的。谢了。