Friday, January 22, 2010

List Insert View | Change Redirect URL

After you insert items in lists, the page goes to AllItems.aspx.
This can be undesireable if you want to allow annonymous access to the form.

Microsoft's documentation says to add RedirectUrl="yourUrl" to the submit button

Others, as me, tried and only worked by replacing the sharepoint button by an html input button with javascript code.

<input type="button" value="Save" name="btnSave" onclick="javascript: {ddwrt:GenFireServerEvent('__commit;__redirect={/Pages/ThankYou.aspx}')}" />


  1. this doesnt't work for me either. Altough it redirects to Thankyou, it does not submit to the list

  2. sorry to hear that. one of the things I remember is I was working with MOSS 2007 at the time (not SP2010); I did not remove the sharepoint button, just hidden it; and all my fields have to be in the same page (cannot have multipage insert forms using custom lists... unless you use panels to simulate it)