protected void Page_Load(object sender, EventArgs e) { Whitfield_Project _wc = new Whitfield_Project(); if (!Page.IsPostBack) { // 1 Get collection NameValueCollection n = Request.QueryString; // 2 See if any query string exists if (n.HasKeys()) { // 3 Get first key and value string k = n.GetKey(0); string v = n.Get(0); string v1 = n.Get(1); string v2 = n.Get(2); // 4 // Test different keys Compeid = Convert.ToInt32(v); EstNum = Convert.ToInt32(v1); twc_proj_number = Convert.ToInt32(v2); hidEstNum.Value = EstNum.ToString(); hidProjNumber.Value = twc_proj_number.ToString(); txtBidAmt.Text = _wc.GetBidAmt(EstNum, Compeid,twc_proj_number); txtClientName.Text = _wc.GetClientName(EstNum,twc_proj_number); txtEstName.Text = _wc.GetProjectName(EstNum,twc_proj_number); } ViewState["EstNum"] = EstNum.ToString(); ViewState["twc_proj_number"] = twc_proj_number.ToString(); ViewState["Compeid"] = Compeid.ToString(); } }