I have a1.aspx that has 3 hyperlinks [Reports,compass,training] ,that go to same page a2.aspx.
on a2.aspx there is a "OK" button,and on button click,different hypelink on a1.aspx should take to different pages.
I have used querystring "url?=" on href of hyperlinks
The href for hyperlinks used on a1 is--
Reports: a2.aspx?url=compass: a2.aspx?url=training: a2.aspx?url=
The snippet for the code on a2.aspx is---
protected void Button1_Click(object sender, EventArgs e)
{
string temp1=Request.QueryString["url"];
if (temp1 == "abc.com")
{
Response.Redirect("abc.com");
}
else if (temp1 == " {
Response.Redirect(" }
else if (temp1 == "xyz.com")
{
Response.Redirect("xyz.com");
}
}
When i click on "OK" in a2.aspx it does not take me to a different page.I guess something is wrong with the loop.
Please help...i m not able to find where am i going wrong.
on a2.aspx there is a "OK" button,and on button click,different hypelink on a1.aspx should take to different pages.
I have used querystring "url?=" on href of hyperlinks
The href for hyperlinks used on a1 is--
Reports: a2.aspx?url=compass: a2.aspx?url=training: a2.aspx?url=
The snippet for the code on a2.aspx is---
protected void Button1_Click(object sender, EventArgs e)
{
string temp1=Request.QueryString["url"];
if (temp1 == "abc.com")
{
Response.Redirect("abc.com");
}
else if (temp1 == " {
Response.Redirect(" }
else if (temp1 == "xyz.com")
{
Response.Redirect("xyz.com");
}
}
When i click on "OK" in a2.aspx it does not take me to a different page.I guess something is wrong with the loop.
Please help...i m not able to find where am i going wrong.