This project has moved and is read-only. For the latest updates, please go here.

SPRedirectWithID - Ignore ID?

Jul 9, 2010 at 5:41 AM

I have a scenario in which I need to "walk" users through a registration process which requires adding multiple items (each a different content type) to a single list.  I would like to be able to redirect them to the same page (with the next content type ID as a query string parameter) each time they click OK, but I have yet to find a way to do this.  Would it be possible to use the SPRedirectWithID function and somehow ignore the ID parameter when the next page loads but still look at the content type ID parameter?  You may have a much better suggestion on how to accomplish this and I'd be happy to hear suggestions! :)  I'm using MOSS 2007.  If I haven't been clear enough about anything please let me know.


Jul 10, 2010 at 8:15 PM


You can do this just by changing the Source Query String parameter along the way. When you first go to the NewForm, pass the second ContentTypeID on the Source parameter with the NewForm as the URL, and so on. You'll need to use script to add the subsequent ContentTypeIds to the Source, which is contained in the page in the "action" in the aspnetForm. If you look at SPRedirectWithID, you'll be able to see how I alter that.


Jul 19, 2010 at 5:26 AM


Thank you!  After some time to look at the code I was able to do just what I needed as you suggested.  Awesome project, some very useful stuff here!!


Jul 19, 2010 at 12:35 PM

Excellent. I'm glad you find SPServices useful!