Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Save New
Message
From
15/07/2008 09:45:11
 
 
To
15/07/2008 09:41:04
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Miscellaneous
Thread ID:
01331292
Message ID:
01331360
Views:
6
I don't have a "New" button on this form. I have "Save", "Save & New", and "Cancel".

>>On a data entry form, the client wants me to implement a "Save & New" button. This button will save the current entity being edited (or added) and add a new entity for editng without exiting the form. Some values from the current entity need to be carried over the the new entity.
>>
>>What is the best way to do this?
>
>One simple way among many; if you have a new button on the form is to call its PerformClick method
>
>
>private void btnSave_Click(object sender, EventArgs e)
>{
>     base.OnClick(e);
>     btnNew.PerformClick();
>}
>
>
>
>Make sure that CloseOnSave is not set to true.
>You could also easily roll your own button or subclass the mmButtonSave overiding the click event handler, calling the base click code and then add the code to perform the new. Lots of different ways depending on your need and flavor. Best way... probably depends. I would probably just roll my own as there isn't that much code to do a save and a new.
>
>Tim
Thanks,
Dan Jurden
djurden@outlook.com
Previous
Reply
Map
View

Click here to load this message in the networking platform