1

I 'm learning Sharepoint using SPD 2010 and was wondering how can we redirect a Sharepoint Page in SPD 2010, like the way we do in any ASP.NET webpage using Response.Redirect("pagename.aspx"). Hence if I'm in Default.aspx and I want my site to redirect to NewPage.aspx on the click of the button. How that can be done in SPD 2010?

2

Edited: You can add a button in SPD and bind it to a javascript function which would redirect to a page. Of course normally MasterPage navigation is used for the navigation, or custom controls which you develop in VS and than add to MasterPage with this kind of functionality.

Modifying page by page to add buttons is not the best idea.

// If you would like to automatic redirect on the page.

Basically you could add a content editor web part to a page and there just put some code to redirect.

For example:

<meta http-equiv="Refresh" content="5; url=http://www.quackit.com/html/tags/"> 

or

<script language="JavaScript">
  function redirectAfterPause() {
    setTimeout("location.href='http://www.bing.com'", 15000);
  }
  _spBodyOnLoadFunctionNames.push("redirectAfterPause"); 
 </script>
  • In the above code, what change should I do to include my custom .aspx page that I have included in the SPD 2010. – xorpower Oct 23 '12 at 12:21
1

If you want to change the Welcome Page [Home Page] of your SharePoint site, you have this option in Site Settings -> Under Look and Feel -> Welcome Page, as shown in below image:

enter image description here

And here you can provide the URL of your Welcome Page or Browse for the page:

enter image description here

But if the URL is dynamic or you want on some other page, you can follow the answer below by injecting javascript!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.