Solved

Is it possible to redirect the page to other page...

Posted on 2010-09-02
2
397 Views
Last Modified: 2012-06-21
Usually in Sharepoint after you edit an item in the custom list you will be redirected to the allitems.apsx page, is it possible to redirect the page to other page instead to allitem.aspx page after editing an item in custom list? I want it to redirect to default.aspx page instead.


CustomList.png
0
Comment
Question by:PagodNaUtak
2 Comments
 
LVL 6

Accepted Solution

by:
nipunu earned 250 total points
ID: 33594243
0
 
LVL 15

Assisted Solution

by:dp_expert
dp_expert earned 250 total points
ID: 33594447
The simplest method is to create (with content editor web part) a custom link to the "newform.aspx" - simply add "?source=/default.aspx" after the newform.aspx and sharepoint will take of the rest.
More fail-proof method would be editing the newform.aspx page and adding javascript that would detect if you have the ?source=/default.aspx in the url and if not would redirect to address with the "?source" - this way page would add the "source" script itself so no matter where you came from it would redirect correctly.

<script type="text/javascript"> 

if(window.location.href.indexOf('?source=/default.aspx')<1) {window.location=window.location.href+'?source=/default.aspx';}

</script>

Open in new window

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now