What's the equivalent in asp.net for the old "form method=post" using the submit. I want to redirect to another page with parameters, but I don't want the parameters to be displayed in the url. So I want to pass ClientName and ClientCompany to www.mySite.com\p.asp?ClientName=John&ClientCompany="JDCo" but I only want to display in the address bar www.mySite.com/p.asp
There are several ways to do this. One way is, put a ASP.NET Button control on your page and then in the click event you could create sessions and assign the parameters to the sessions. Then you would response.redirect to the new page and check for the sessions. Here is example code for the button click event (in C#): -------- Session["MyParam1"] = "Hello"; Session["MyParam2"] = "World"; Response.Redirect("p.asp"); ---------- Then to read the parameters on the receiving page you would do the following to write them out on the screen: ---------------- string sParam1 = Session["MyParam1"].ToString(); string sParam2 = Session["MyParam2"].ToString(); Response.Write(sParam1 + " " + sParam2); ---------------- Result on Screen: Hello World