.Net (C#, Threading, ASP.Net, MVC, MVC4 Web Api etc) Multiple Choice Questions
This post contains multiple choice questions from amongst all
the important technologies running on top of .Net framework. If you go through
all these questions and try answering them, then you will surely get a very
good insite of all these technologies.
Please note that this list will contain very selective (but conceptual) questions and will be ever evolving.
Please note that this list will contain very selective (but conceptual) questions and will be ever evolving.
Questions:
1. There is an ASP.net Textbox and a Button next to
each other on a Web page. User types his name in the textbox and submits the
button. Which of the below holds true:
a. The textbox retains the name written in it
always.
b. The textbox retains the name written in it if
the ViewState of Textbox is enabled but of Web Page is disabled.
c. The textbox retains the name written in it if
the ViewState of the Web page is enabled but of Textbox is disabled.
d. The textbox retains the name written in it if
the ViewState of both the web page and the Textbox is enabled.
2. The Session_End event in Global.asax.cs is fired
in which of the below cases:
a. In Proc session state only.
b.
Out Proc session state only.
c. Both In Proc and Out Proc session state.
d.
None of the above.
3. Below given are four routes for an ASP.net MVC
application. If we have to use all of
the below routes in our application, specify the order in which you will write
them in Global.asax.cs file:
i. routes.MapRoute(
"DefaultController",
"{controller}",
new { controller = "Account", action = "LogOn", id = UrlParameter.Optional
}
);
ii. routes.MapRoute(
"DefaultControllerId",
"{controller}/{id}",
new { controller = "Account", action = "LogOn", id = UrlParameter.Optional
}
);
iii. routes.MapRoute(
"DefaultAction",
"{controller}/{action}",
new { controller = "Account", action = "LogOn", id = UrlParameter.Optional
}
);
iv. routes.MapRoute(
"DefaultActionId",
"{controller}/{action}/{id}",
new { controller = "Account", action = "LogOn", id = UrlParameter.Optional
}
);
a. i, ii, iii, iv
b.
iv, iii, ii, i
c.
iii, ii, i, iv
d.
ii, iv, i, iii
4. Pick the incorrect
name for a Http Get request handler in an ASP.net MVC4 Web Api:
a. getEmployee
b.
GetEmployee
c. Both a and b.
d.
None of the above.
5. Action methods in a controller should be:
a. Either of public and protected or private
b.
Either of public and private.
c. Either of protected and private.
d.
Public only.
Comments
Post a Comment