Response.Redirect renders in same canvas page !

Jul 19, 2008 at 1:13 PM
Hi there ...
I'm developing an IFrame facebook application using Microsoft Facebook Toolkit V1.6 , and I need to put a link that redirect to the user's profile page, using Response.Redirect(string.Format("http://www.facebook.com/profile.php?id={0}",Base.FbService.UserId) - where this url is the url to the user's profile page with the user id passed as a query string - , it works but the profile page is rendered INSIDE the applications canvas page, how can i make it a separate page in the browser, not hosted in the canvas page ??

Thanks in advance for your help ...
Jul 20, 2008 at 9:23 PM
Hey,

i do this with

Page.RegisterStartupScript(this,"<script>window.parent.location='http://www.facebook.com/profile.php?id="+Base.FbService.UserId"';</script>");
Jul 21, 2008 at 12:28 AM
as suggested, use RegisterStartupScript.

The app is hosted inside the IFrame. With Response.Redirect, you are changing the URL of the IFrame element, not the URL of the parent element which is the browser.

NB RegisterStartupScript does not work with AJAX.