Add multiple ActionName for button

Posted by NewToBirtReporting on Stack Overflow See other posts from Stack Overflow or by NewToBirtReporting
Published on 2012-06-20T07:45:25Z Indexed on 2012/06/20 9:16 UTC
Read the original article Hit count: 150

Filed under:

I have one controller on which i have Save button click event. Im using same controller and view for Add and Edit purpose. My code is as per below

[HttpPost]
            [Button(ButtonName = "Save")]
            [ActionName("Create")]
            [ValidateAntiForgeryToken(Salt = "PostData")]
            public ActionResult Save(Ntegra m_Ntegra,FormCollection form)
            {}

As Im Using ActionName("Create") here so button can not work for ActionName("Edit"). can anyone tell me how i can achive my requirnment!! Thanks for help...... :)

© Stack Overflow or respective owner

Related posts about asp.net-mvc