protected void LinkButton1_Click(object sender, EventArgs e) { if (!checkCookie()) Response.Redirect("Login.aspx"); String customerUsername = Request.Cookies["Car-Trading"]["Username"].ToString(); DatabaseHandler obj=new DatabaseHandler(); DataSet ds=obj.GetCustomerId(customerUsername); String customerId = ds.Tables[0].Rows[0]["CUSTOMER_ID"].ToString(); EncryptDecrypt obj1 = new EncryptDecrypt(); customerId = HttpUtility.UrlEncode(obj1.Encrypt(customerId)); Response.Redirect("CustomerBuyCar.aspx?carId=" + Request.QueryString["carId"].ToString() + "&sellerId=" + Request.QueryString["sellerId"].ToString() + "&customerId=" + customerId); }