Let us first know how SharePoint does it. SharePoint adds a "Source" parameter to the querystring and uses that to return back to the previous page.
So how do we do that??
There are lot of ways to do this, why not use us the ways sharepoint does it.. (the standard way as they say)
Sharepoint uses a javascript function "GoToLink" to achieve this i.e. add a "Source paarameter to the query string"
Call this function "onclick" of your hyperlink and it will automatically append previous page as source parameter
Example
edit item
where is this GoToLink located? where can i find the code for it?
ReplyDeleteIt is a standard javascript function available in the core.js file of sharepoint.
ReplyDeleteYou can find core.js in the layouts folder
e.g _layouts/1033/core.js