StrataFrame Forum
Home
»
StrataFrame Application Framework - V1
»
WebForms (How do I?)
How do I redirect to a new web page using the AfterSave event.
http://forum.strataframe.net/Topic32076.aspx
By Jeff Pagley
-
5/27/2013
I'm using asp.net web forms and would like to redirect a user whenever the data they entered successfully saves to the database. I was wondering how to do this using the AfterSave event. Or maybe there's a better way to do it??
Thanks!
By StrataFrame Team
-
5/28/2013
Most likely, you'll be saving your data during a postback on the OnLoad method. Saving is a quick operation, so I would just save like normal, check the SaveResult enum value returned from the Save(), and call Response.Redirect() if the save successful. I don't think you'll have to use the AfterSave event to do it.
By Jeff Pagley
-
5/28/2013
Thank you so much for your help!
How do I check the SaveResult enum value that gets returned by the Save()?
By Jeff Pagley
-
5/28/2013
I figured it out.
Thank you!