asp.net mvc 3 - Two different actions on same view in mvc3 with razor -


i have created 1 application mvc3 (razor) named studentapp. have 1 page index page. want add 2 actions on same page.

action 1: insert new student.
action 2: search student.

so how should maintain 2 different actions on same view.

you don't have actions on view. have action guides users index view, on view, have buttons or forms calls different actions (insertion, search).

your controllers should able recognize action being called, process , call appropiate view. also, each view should able render appropiate info depending on situation.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -