asp.net - redirecting a page link and changing page text based on link -


OK I'm not sure the question title is really correct, the novice web developer is here with me. There is an ASP.Net Webstist running on IIS 6.0 - so here's the problem: I have two pages called Page 1 and Home - You can navigate both like www.mysite.com/Page1.aspx, www.mysite.com /home.aspx

Page 1 is now going through many changes so that it can be seen much like home, except for some very small text changes.

  1. Create a page (say newhome.aspx) Which displays the correct text based on the URL of the link on which people clicked

  2. Existing links to this new page (and of course, the above requirements Appropriate text will appear as shown).

I think they are similar, the line below I only want a page and everyone wants to be redirected to this new page as well as inheriting it.

Thank you

To ensure that the old Links still work, you can either:

  • Put old pages there and use Response.Redirect () in Page_Load methods, and any type of question For example, a query string parameter for showing a new page to show:

    The response. Redirect ("~ / newhome.aspx? OldUrl =" + Server.UrlEncode (Request URL ToString ());

  • Or use the system to route the route from the old URL to the new page, then within the new page you get the url which requests user url. URL

  • / Li> = ""; . . . If (requestUrl.ToString (.) Ends (labeled "Page1.aspx")) Text = "foo"; Other labels. Text = "bar"; }

Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -