Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

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>
share|improve this answer
    
In the above code, what change should I do to include my custom .aspx page that I have included in the SPD 2010. –  Romil N Oct 23 '12 at 12:21
add comment

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!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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