Sayed Faiz

Sayed Faiz

  • NA
  • 7
  • 0

problem in retrieving value from url and redirecting aspx pages

Apr 28 2009 9:52 AM

 hi..I am trying to redirect my aspx page to a new page, by passing in some values in the url, and I am using the following code in the c# code behind:

Response.Redirect("redirect.aspx?type=1"); 

and in the redirect.aspx page, I'm trying to retrieve the value of 'type' in the url like this:

string values = null;
values = Request["type"];

if (values == "2")
{
this.SuccessLabel.Text = "Respodent Successsfully Registered for the Job Event";
Response.AppendHeader("Refresh", "3; URL=Welcome.aspx");
}
else if (values == "1")
{
this.SuccessLabel.Text = "Respondent registered successfuly";
Response.AppendHeader("Refresh", "3; URL=Welcome.aspx");
}
although the redirect page loads with the correct value passed in the url, but the SuccessLabel.Text 
is not updated with the text value I put in the above code and the page is also not redirected to the 'welcome.aspx' page. any idea why??
 
thanks 
 

Answers (1)