title: How to pass two parameters in query string?
body: <p>I want to pass two parametrs cartid and productis via query string.
  Cartid is to be generated either from session(if available) else from database and Product is to be fetch from previous query sting</p>
  
  <p>My code is(in case cart id is to be fetch from database)</p>
  
  <pre><code>        CartInfo cartinfo = new CartInfo();
          cartinfo.UserName = Session["UserName"].ToString();
          cartinfo.IsOrder = "0";
          cartinfo.CartDate = DateTime.Now;
          int id = new InsertAction().InsertData(cartinfo);
          if (id!=0)
          {
              lblmsg.Text = "Inserted Sucessfully";
              Session["CartID"] = id;
              if (Request.QueryString["ProductID"] != null)
              {
                 int productid = int.Parse(Request.QueryString["ProductID"]);
              }
              Response.Redirect("ViewCartItems.aspx?CartID=id &amp; ProductID=productid");
  
          }
  </code></pre>
  
  <p>and in case cartid is to be fetch from the session created</p>
  
  <pre><code>if (Session["CartID"] != null)
          {
              string cartid;
              int productid;
              if (Request.QueryString["ProductID"] != null)
              {
                  cartid = Session["CartID"].ToString();
                  productid = int.Parse(Request.QueryString["ProductID"]);
                  DataSet ds = new AddCartItem().GetCartItem(cartid, productid);
                  if (ds.Tables[0].Rows.Count &gt; 0)
                  {
                      DataSet ds1 = new AddCartItem().UpdateCartItem(cartid, productid);
  
                  }
  </code></pre>
  
  <p>but both the queries are wrong
  the are generating url like this</p>
  
  <pre><code>http://localhost:1030/SShopping%20Website/client/ViewCartItems.aspx?CartID=id%20&amp;%20ProductID=productid
  </code></pre>
  
  <p>Please help</p>