1
  Response.Redirect("~/CustomList.aspx?id="+Data.Item1+"&type="+Data.Item2);

I am adding this from Codebehind Asp.net

However it isn't working

Getting this Error

This page can't be displayed

•Make sure the web address http://localhost:51955 is correct.

•Look for the page with your search engine.

•Refresh the page in a few minutes.

8
  • Could your assign URL to variable and see its value? It will help you to debug the problem. Commented May 22, 2013 at 11:01
  • ~/CustomList.aspx?id=2&type=next get the following url Commented May 22, 2013 at 11:06
  • what is the url you see on your browser..??? Commented May 22, 2013 at 11:14
  • localhost:51955/CustomList.aspx?id=1&type=next Commented May 22, 2013 at 11:20
  • Make sure the path is correct and do you get the same output in other browser? What browser are you testing with now? Commented May 22, 2013 at 11:26

1 Answer 1

1

Could you try something like this ?

 string parameter1 = HttpUtility.UrlEncode(Data.Item1)
 string parameter2 =  HttpUtility.UrlEncode(Data.Item2)

 Response.Redirect("~/CustomList.aspx?id="+parameter1 +"&type="+parameter2 );

And make sure that page is in the root of your project, is this page is in another project, you will need to change the port in the URL. Localhost:port/CustomList.aspx

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.