I used the query string parameter to redirect from Page 1 to page 2. From page 2, I wanted to redirect it to page 1. What should be the condition for checking if querystring is used ?? Please help me! Thanks guys!
Ram, this is my interpretation of what you wanted: if a user accesses page2 because of a redirect from Page 1, the user will be redirected automatically to the page. If the user accesses Page2 directly (without visiting Page1), the user will remain at Page2 (not redirected to page 3).
If so, inside page1 you can set the redirection ("Page2.aspx? Previouspage = page1"), then in Page2, inside the Page_load method, check if there is a sequence of requests, if the previous page exists and is equal to "page1", redirect to the page 3, otherwise do nothing, and the page will be displayed.
You might want to parse the HTTP_REFERER and see if the page was called from Page 1. Basically, you should create a redirect based on the value of HTTP_REFERER. In C #, a value is available using the following:
Page.Request.ServerVariables("HTTP_REFERER")
- 2 .
, ( 5 - , , - , , , ). Page 1 3. - , 1 Page 3, , ; server.transfer 2, , 1 → 2 → 3, 1 → 3. URI, , , 1.
, . 1, , . 3, . , , , . 2? , ( , , , , - - ), , , .
Perhaps I do not understand this right .. but why not redirect directly from page 1 to page 3?
Source: https://habr.com/ru/post/1758775/More articles:highlight words on page with URL extension - htmlЧто работает лучше: несколько хранимых процедур sql-сервера с одним результатом или единая многозадачная хранимая процедура - c#jQuery $ .post (); - jqueryHow to get a list of member names from Enum? - enumsEF4 One-to-many mapping in an existing database without navigation - entity-frameworkAndroid: сохранение данных ListView при закрытии приложения - androidUpdate Android widget provided - androidWhat does the "limited library" mean in Java? - java2 Different aggregations in a core - sqlMime types in the Windows registry - c #All Articles