I have to pass two query strings that i've entered and display them on another page.
Here is the code where i attempt to pass them.
protected void btnDisplay_Click(object sender, EventArgs e)
{
string vacations = Session["Vacations"] as string;
string hobbies = Session["Hobbies"] as string;
string classes = Session["Classes"] as string;
lblDisplay.Text = "Your favorite vacations spots are: " + vacations + "<br />" +
"Your hobbies are: " + hobbies + "<br />" +
"Your IT Classes are: " + classes;
}
protected void btnRedirect_Click(object sender, EventArgs e)
{
string vacations = Request.QueryString["vacations"];
Response.Redirect("Summary2.aspx?vacations=" + vacations);
}
Here is where I attempt to retrieve and display them.
protected void btnDisplay_Click(object sender, EventArgs e)
{
lblDisplay.Text = Request.QueryString["vacations"];
}
I can't figure out what I am doing wrong. When i hit the Display button on my 2nd page, nothing shows up. Which I am assuming I am not passing the information correctly.
PS The information that is trying to be passed is the session states on the stop of my code. I only need to send the vacations and the classes through the query string.
vacations=?