Execute Action Method

Blog Author


Published Date

21st September, 2018




  • Share this blog :

Understanding action method execution:

2Whenever first time request is coming to sample2 view the request will go to global.asax file check the action method name and control name then control will go to the that action method in the controller execute that action method lode them controller will be return view. After executing the view result will be delivered to client. 2Even when user client on button also same action method will be called 2If we want to call the other action method from the control we use the following procedure.

Learn more about Interview Questions in this blog post.
Interested in mastering Check out this blog post to learn more Tutorials.

Step1:   create action method with same name as view name with one argument of string type as button name Function name is we find me action method like [accept verbs (http] Public action result view name (string button name) { Code Return view (); } àIn the above example to call the own action method from button “B1”, use the following steps Go to home controller.cs


Write the following code [accept verbs (] Public action result sample2 (string B1) { View data [“a”] =”welcome sai”; Return view (); } Go to sample2.aspx Write the add the following code in the HTML form <%: view data [“a”] %> Run the application and check

For indepth understanding click on


About Author


Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills .

Related Blogs

Write For Us