Take Control of your OK and Cancel Buttons

I wrote this article a while back, but looks like I didn’t link to it from my blog at the time, so here goes:


This article describes how to force newform.aspx to redirect to one page when the user clicks OK and a different page when she clicks cancel.


Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

3 thoughts on “Take Control of your OK and Cancel Buttons

  1. Pingback: Tweets that mention Take Control of your OK and Cancel Buttons « Paul Galvin's SharePoint Space -- Topsy.com

  2. Michael

    I have tried using your code and it works fine without a redirect on the ‘Ok’ button. If I add the ‘&Source=url.aspx’ then the cancel button throws up an “invalid url” error message but then goes to the page I want it to. Any suggestions?

    1. Paul Galvin Post author

      This is an ancient comment that I managed to lose track of. Sorry! I hope you figured out what you were trying to do.


Leave a Reply

Your email address will not be published. Required fields are marked *