.Net Interview Questions and Answers

Search:

ASP.NET MVC written test Interview question

By : Shiv Prasad Koirala | Jun 21st, 2014 | Views : 7171 | Comments : 0 Bookmark and Share

Below is a MVC written test Interview question paper which was given to senior people to do pre-evaluation.


If you are supposed to do validation in MVC what the best approach?


  • Write the validation in the models.
  • Use data annotations like [required] validator.


You want to implement Ajax in MVC, what will you do?


  • XML HTTP Request
  • Use JSON and JQUERY calls
  • Update panel


You want to create SEO friendly URL's in MVC?


  • Routing
  • Create custom HTTP handlers and use VERB


Which of the below statements are false?


  • Viewdata helps to pass data from controller to view.
  • Tempdata helps to pass data from controller to controller.
  • Viewdata helps to pass data from view to controller.


If you want to bind two models with a view?


  • Not possible with MVC
  • Use ViewModel


You want to emit out JSON from MVC?


  • Serialize the object and pass it back
  • Use JSONResult
  • Use WCF and emit out JSON


How is the hierarchy in Angular?


  • Controller -> App -> Model
  • App ->Controller-> Model


You want to compress your JavaScript files in MVC?


  • Use Winrar
  • Use Bundling and minification


You want to make cross domain JSON calls :-


  • Enable cross domain in web.config file of JSON project.
  • Use [CrossDomain] attribute.
  • CORS does not work by design


What is the use of filters ?


  • Filters and queries SQL
  • Does preprocessing and post processing logic


Can we do pessimistic locking in EF ?


  • Yes
  • No


You want to render MVC ASCX ?


  • Use RenderAction
  • Use RenderPartial


Is it possible to create a custom view engine like Razor ?


  • No
  • Yes


How to enable Lazy loading in EF ?


  • Use include
  • Use stored procedures.
  • None of the above , it enabled by default.


What is false about WebAPI ?


  • It does content negotiation.
  • Emits out JSON and XML
  • Emits out WCF SOAP


You have heavy Action which is taking lot of time ?


  • Create that site on a different app pool.
  • Use Delegates
  • Use Async controllers.


In case you are fresher to MVC start from the below video


 
Rate this Article :
1 Star
2 Stars
3 Stars
4 Stars
5 Stars
1 1 1 2 1
 
 
 
 

.NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala

In this article we will explain .NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala.... Read More

Explain MVC application life cycle?

In this article we will explain MVC application life cycle.For more articles and videos visit us on www.questpond.com... Read More

What is the difference between Stored Procedures and Function (SQL Server interview question with answers)?

In this article we will explain what is the difference between Stored Procedures and Function.For more articles and videos visit us on www.questpond.com... Read More

C# Design pattern interview questions with answers: - How Singleton is different from Static class?

In this article we will explain How Singleton is different from Static class.... Read More

WCF interview questions and answers: - What is the difference between Service endpoint and Client endpoint?

In this article we will explain What is the difference between Service endpoint and Client endpoint.... Read More

.NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala

In this article we will explain .NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala.... Read More

Explain MVC application life cycle?

In this article we will explain MVC application life cycle.For more articles and videos visit us on www.questpond.com... Read More

What is the difference between Stored Procedures and Function (SQL Server interview question with answers)?

In this article we will explain what is the difference between Stored Procedures and Function.For more articles and videos visit us on www.questpond.com... Read More

C# Design pattern interview questions with answers: - How Singleton is different from Static class?

In this article we will explain How Singleton is different from Static class.... Read More

WCF interview questions and answers: - What is the difference between Service endpoint and Client endpoint?

In this article we will explain What is the difference between Service endpoint and Client endpoint.... Read More

Article Categories

Learn in Hindi