Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




C# and ASP.NET MVC (Model view controller) interview questions and answers: - How can we restrict MVC actions to be invoked only by GET or POST?

Download Attachment

We can decorate the MVC action by “HttpGet” or “HttpPost” attribute to restrict the type of HTTP calls. For instance you can see in the below code snippet the “DisplayCustomer” action can only be invoked by “HttpGet”. If we try to make Http post on “DisplayCustomer” it will throw a error.

Below is an important c# interview question and answers video  : -   Difference between viewstate and session ?   

 

Do visit us for c#  and ASP.NET MVC interview question and answers  

See more stuffs ASP.NET(MVC)/C# interview questions

Regards,

Click here to view more c# and .NET MVC interview question and answers 

Share this article   |    Print    |    Article read by 1437 times
Author:
Shivprasad koirala Koirala
I am a Microsoft MVP for ASP/ASP.NET and currently a CEO of a small E-learning company in India. We are very much active in making training videos , writing books and corporate trainings. Do visit my site http://www.questpond.com for .NET, C# , design pattern , WCF , Silverlight , LINQ , ASP.NET , ADO.NET , Sharepoint , UML , SQL Server training and Interview questions and answers
Related Articles: No related article
Related Interview Questions: