Home > SharePoint, SharePoint 2010, SharePoint Online > SharePoint Sandbox Solution – Page Redirect

SharePoint Sandbox Solution – Page Redirect

Redirecting to a new page from a sandbox solution is a big challenge. But customers won’t agree and eventually we need to find a workaround to achieve this.

The best option is to add a literal control in the webpart

<asp:Literal ID="litRedirect" runat="server" />

From codebehind we can redirect using below code

litRedirect.Text = "<script type='text/javascript'>window.location = 'https://amalhashim.wordpress.com/';</script>";
Advertisements
  1. May 14, 2013 at 3:22 PM
  2. Sara
    July 17, 2013 at 6:25 AM

    Thanks for posting this. I have been searching for some time to try to find a solution to this restrictionin SharePoint online. Worked perfectly for me!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: