How to work Mode Redirect in ASP.NET?

Posted by Rajujrk under ASP.NET on 2/26/2010 | Views : 1600 | Status : [Member] | Replies : 6
Hai all,

I need the mode redirect technology in ASP.Net...

That is, in address bar only one URL is present.. But i clicking the link it will redirect to another page..

But it will not affect the current URL...


Simply one URL with more page redirections...

How to implement it in ASP.NET

Thanks & Regards

Rajkumar J



Responses

Posted by: Vuyiswamb on: 2/26/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
OK i understand what you are saying , but it should use different url based on what condition ?

Thank you for posting at Dotnetfunda
[Administrator]

Rajujrk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Poster on: 2/26/2010 [Member] Starter

Up
0
Down
Use FRAMES in HTML.

Create top frame and bottom frame, target the link of top frame to open in the bottom. Your URL will not change but the page content will change. More details you can read from http://www.w3.org/TR/REC-html40/present/frames.html

The other way is you can use jQuery.Post or jQuery.Get method to get the page and load into the div element.

Hope this will help.


Rajujrk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajujrk on: 2/26/2010 [Member] Starter

Up
0
Down
Hai,

No No i dont want the Frame concept..

Assume i have two types of web applications like CMS and CRM application in ASP.NET and PHP respectively...

when i rediret From ASP.NET application to PHP, URL will show the asp.net page.. but the current page is created in PHP file on different server..

Did u understand my question?



Thanks & Regards

Rajkumar J

Rajujrk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Abhi2434 on: 2/26/2010 [Member] [Microsoft_MVP] [MVP] Silver

Up
0
Down
Why dont you redirect using Server.Transfer.

I think if you can pass to the page using Server.Transfer from your redirection handler, it would seem to the user that it is an aspx page.



www.abhisheksur.com

Rajujrk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajujrk on: 2/26/2010 [Member] Starter

Up
0
Down
But Server.Transfer redirect the page only if it present in the same server..

My Question is redirect from one page in one server to another page present in different server without changing the URL...

Thanks & Regards

Rajkumar J

Rajujrk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Abhi2434 on: 2/27/2010 [Member] [Microsoft_MVP] [MVP] Silver

Up
0
Down
Ok...

For that you have two options :

1. Use IFrame
2. Use Server side Remote Calls and write to Response.

The first one is the easiest. Just put a hidden IFrame and post the url from there. When resonse is received from the server load the current page with the document present in the Iframe.

The second approach is little harsh. You can create new WebRequest from server side.
Just instead of Response.Redirect / Server.Transfer, use WebRequest.Create to create a new Web request and fetch the response. Write the response back to the original response.
Remember, if you do not change the context, every request made from the page will be transferred to the current server. Like any relative path mentioned will be called your server.

So parse the Response while putting it from server side and replace all the relative requests from the page with absolute links.

Cheers.

www.abhisheksur.com

Rajujrk, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response