可以清空Request.QueryString["id"]里面的值吗?

解决方案 »

  1.   

    function showwindow()
    {
    var str= window.showModalDialog('HTMLPage2.htm','window','dialogHeight: 550px; dialogWidth:1000px; center: Yes; help: No; resizable: Yes; status: No;');
    window.location.href=window.location.href+"?id="+str;
       
    }
    这个id是上面这个函数传过来的,加入第一次传过来的值的URL是a.aspx?id=1
    第2次的URL成a.aspx?id=1?id=2?
    不知道为什么
      

  2.   

    不能直接情况,要跳转到新的url才行!!!
      

  3.   

    BearRui(开心熊 | 来地球抢分) ( ) 信誉:110 
    ========================
    没明白你的意思
      

  4.   

    这句话是用来接收的,当你没有传来参数的时候1抱错,2为空所以说当重新url后里面的值 就为空了不要想得太复杂
      

  5.   

    hongcha99() ( ) 信誉:100 
    ======================
    可否告知我一个例子
      

  6.   

    J_fenix(武器种族传说) ( ) 信誉:100 
    =====================
    你们怎么说的我都不明白啊?具体怎么操作阿
      

  7.   

    我现在是根据传过来的ID号绑定GRIDVIEW的。
      

  8.   

    我舉個例子如下吧:    
        if (Request.QueryString["customerID"]!=null && !string.IsNullOrEmpty(Request.QueryString["customerID"].ToString()))
            {
                Session["customerID"] = Request.QueryString["customerID"].ToString();
                Response.Redirect(HttpContext.Current.Request.Url.ToString().Remove(HttpContext.Current.Request.Url.ToString().LastIndexOf('&')));
            }
            if (Session["customerID"] != null && !string.IsNullOrEmpty(Session["customerID"].ToString()))
            {
                Master.SetWhere("CustomerID='" + Session["customerID"].ToString() + "'");
                DataBind();
                Session["customerID"] = null;
            }