tags:

views:

31

answers:

3

Hi,

I want server.transfer to transfer the control to a different website other than the one I am in currently. Is that possible.

One way I thought of doing is to read the contents of that website and write in the response but would love to know if any other way to do so.

My website is www.xyz.com/otherwebsite/forms/page.aspx So in above url, www.xyz.com is a website and otherwebsite is also a website and I want to do server.transfer from otherwebsite to www.xyz.com

Thanks, Nimesh

+1  A: 

you have couple choices..

Server.Transfer - does a transfer w/out notifying the browser. so your browser will still see the first website in the address bar.

Response.Redirect- tells the browser to go to another site. The behavior will seem similar to the user. transfer is faster because of less round trips, but most likely not what you want due to the address bar issue..

you could also configure IIS to redirect particular address,

really depends on your requirements...

Sonic Soul
Hi Sonic, yeah I thought of response.redirect but it won't server my purpose for SEO issues. For 404 pages, I still want it to be 404 but response.redirect sends 302 status code. I want 404's to return 404.
Nimesh
+1  A: 

If you just want to Redirect, use Response.Redirect("http://www.mywebpage.com/");

Not entirely sure what you mean by Transfer, but if you update your question I can provide more help.

Marko
+1  A: 

Hi All,

I finally did the Response.Write(Reading content from the specific location) method. Server.Transfer can only be used on the same virtual directory (i.e. on same website) as it transfers all the request information to the next page and it can only be done on same session.

Thanks,

Nimesh

Nimesh