Navigating to a page without passing HttpRequest.UrlReferrer
-
Hello everyone. I have a little application in which there are some main pages, and some detail pages for each main page. in the detail page there is a button which gets you back to one of the main pages. the main page, in the OnLoad method, there is a method which saves the page thet led you there (using HttpRequest.UrlReferrer). I need the main page not to store the urlreferrer of the detail page, passing null as urlreferrer value. I know javascript does this, but for some reason i cannot use it - and i am forced to do everything server-side. Is there some method which sends you to one page, without passing its own url? I googled about it and found lots of pages about people complaining that Response.redirect has this behaviour. I tried, and to my dismay, found that in my application works flawlessly - that is NOT what i want. I need Response.redirect NOT to work, thus passing null as the HttpRequest.UrlReferrer value. I know this is at least confusing, but please try and see if you can give me an hand. Thanks in advance. Rey9999
~~~ From Milano to The Hague, easy as it goes ~~~
-
Hello everyone. I have a little application in which there are some main pages, and some detail pages for each main page. in the detail page there is a button which gets you back to one of the main pages. the main page, in the OnLoad method, there is a method which saves the page thet led you there (using HttpRequest.UrlReferrer). I need the main page not to store the urlreferrer of the detail page, passing null as urlreferrer value. I know javascript does this, but for some reason i cannot use it - and i am forced to do everything server-side. Is there some method which sends you to one page, without passing its own url? I googled about it and found lots of pages about people complaining that Response.redirect has this behaviour. I tried, and to my dismay, found that in my application works flawlessly - that is NOT what i want. I need Response.redirect NOT to work, thus passing null as the HttpRequest.UrlReferrer value. I know this is at least confusing, but please try and see if you can give me an hand. Thanks in advance. Rey9999
~~~ From Milano to The Hague, easy as it goes ~~~
This looks odd. Changing the value sent on referrer can't be done AFAIK. BTW, why you need such a solution ?
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
-
This looks odd. Changing the value sent on referrer can't be done AFAIK. BTW, why you need such a solution ?
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
N a v a n e e t h wrote:
BTW, why you need such a solution ?
It is a long story.... :( :( Anyway, i do not need to change it. I just need it to be null, and i know there are some situation in which HttpRequest.UrlReferrer is null. Example: typing a new url in the address bar using browser history using javascript... I need something like that, just server-side. I read around that Response.Redirect has sometimes this behaviour, but not in my case. Any ideas?
~~~ From Milano to The Hague, easy as it goes ~~~
-
Hello everyone. I have a little application in which there are some main pages, and some detail pages for each main page. in the detail page there is a button which gets you back to one of the main pages. the main page, in the OnLoad method, there is a method which saves the page thet led you there (using HttpRequest.UrlReferrer). I need the main page not to store the urlreferrer of the detail page, passing null as urlreferrer value. I know javascript does this, but for some reason i cannot use it - and i am forced to do everything server-side. Is there some method which sends you to one page, without passing its own url? I googled about it and found lots of pages about people complaining that Response.redirect has this behaviour. I tried, and to my dismay, found that in my application works flawlessly - that is NOT what i want. I need Response.redirect NOT to work, thus passing null as the HttpRequest.UrlReferrer value. I know this is at least confusing, but please try and see if you can give me an hand. Thanks in advance. Rey9999
~~~ From Milano to The Hague, easy as it goes ~~~
I think you cannot do it in server. Whether Main and Detail page url has any pattern. If it has then use it to check whether its detail or mail page and work with that. Else, i think HttpRequest.UrlReferrer cannot be set null from Server. Also have you tried using Response.Headers referrer property to null Check My other Asp.net Posts
Regards, Webtips - Web Development tips