ASP.NET MVC Interview Questions and Answers Part 4

By
1.) What are the features of ASP.NET MVC 4 Template ?                                                
There are some features of asp.net mvc 4 as given below:-
  • ASP.NET MVC 4 was released on august 15, 2012
  • It includes all features of mvc 3 as well as some advance features also.
  • It runs on .NET 4.0,.NET 4.5  and with visual studio 2010 and visual studio 2012.
  • It supports asp.net Web API.
  • It supports mobile project template using jquery.
  • It supports Asynchronous controllers .
  • It is helpful in bundling and minification.
  • It support the Windows Azure SDK.
  • It supports display mode functionality.
  • It supports asp.net WEB API 2.
  • It supports bootstrap in mvc template.
  • It supports ASP.NET Scaffolding.
  • It supports asp.net Identity.
  • It Supports authentication filters also. 
2.) What is difference between ASPX and Razor view engine  ?                                   
More Details...

3.) What is routing in asp.net mvc  ?                                                                                       
ASP.NET MVC Framework works on the concepts of routing to map URLs to the Controller class and Action defined in the Controller.
4.) Can we change Action Method Name in coding  ?                                
Yes, we can change Action method name in coding . 
5.) Is asp.net application using Routing table ?                                                                   
No, It specifically maps the URL based incoming request to the physical file(ex .aspx file) .

6.) What is Routing table ?                                                                                                         
Routing table is a storage table which stores the registered URL patterns. 

7.) Where does routing table's codes reside  ?                                                         
 Global.aspx file
8.) What is pattern in mvc ?                                                                                                       
A pattern is a signature that helps for matching the Incoming Request to your system or other.
Example :-
{controller}/{action}/{id} is a predefined pattern in every MVC templates.You can change your route Path according to your project using Custom Routing Functionality.
9.) What is exact meaning of pattern in mvc ?Explain.                                                    
Suppose you have hosted your MVC Application on server and your domain name is http://mysite.com .If you want to open a page that contains images and image id 10 then what will you do? You will find this page through your Browser URL request over the internet.
You will type your request as following way in your browser as given below:- http://mysite.com/controller-name/action-name/id-parameter .
Suppose your project definition as follows.
 controller name = Bollywood
action-name =images
Image id=10
Then you will request following URL through browser over internet as given below:-
 http://mysite.com/Bollywood/images/10
  Note:-
  • If You want access above information on your local system then it will be like this http://localhost:59279/Bollywood/images/10
  • Remember, Name of controller and action will be case sensitive.
  • Remember one things,Route name can't duplicated in application.it will be unique in whole application.
10.) What will be error message show if no Url match is found in routing table?
404 HTTP status code
10.) How to create an mvc application with model,view and controller?                 
More Details...

0 comments:

Post a Comment

Powered by Blogger.