Category Archives: SharePoint Designer 2007/2010

Display list or library on another site. (No Code Required)

This is a very cool functionality that I found it from this video. All has been tested and worked perfectly.

http://www.youtube.com/watch?v=0SfpgoEUlIw

If you have got error on the imported web part, please try to reload the the web part and re-insert it on the page again.

Thanks for the author Laura Rogers for offering such a good solution.

Change the Default SharePoint OK and Cancel Button

Sometimes, we want to lead a page to a particular url location after clicking the SharePoint default OK and Cancel Button. However, it seems there is no way to change it. There is workaround I found on:

http://anythingprogramming-emsomeone.blogspot.com.au/2011/09/change-default-sharepoint-ok-and-cancel.html

Requirement:

When you click on the sharepoint OK and Cancel button, it should be redirected to a different url.

Workaround:

Instead of using the default sharepoint buttons:

<SharePoint:SaveButton runat=”server” ControlMode=”Edit” id=”savebutton1″ Text=”OK”/>
<SharePoint:GoBackButton runat=”server” ControlMode=”Edit” id=”gobackbutton2″/>

replace them with this:

<input type=”button” value=”OK” name=”btnSave” onclick=”javascript: {ddwrt:GenFireServerEvent(‘__commit;__redirect={}’)}” />


<input type=”button” value=”Cancel” name=”btnCancel” onclick=”javascript: {ddwrt:GenFireServerEvent(‘__redirect={}’)}” />

*** Note:
– You can put any URL in the __redirect={} that you want, for example __redirect={http://www.google.com} or __redirect={/news/PressReleases/}
– There should be no quotes around the URLs passed into the __redirect directive