Professional Documents
Culture Documents
ASP
ASP
NET
Answer: D
2. You want to enable Page Output Caching in ASP.NET. What code you will write in ASPX page.
3. What are the minimum attribute required to create a connection string using SqlConnection
object?
A) - Data Source
- Initial Catalog
- Integrated security=true
B) - Server
- Database
- Integrated security=true
C) Option A and B both are correct.
D) None of the above.
Answer: C
A) Response.Cookies["visit"].Value = DateTime.Now.ToString();
Response.Cookie["WebsiteName"].Value = "AIPDM";
Response.Cookies["color"].Value = "blue";
B) Response.Cookies.Value = DateTime.Now.ToString();
Response.Cookies.Value = "AIPDM";
Response.Cookies.Value = "blue";
C) Response.Cookies["info"]["visit"].Value = DateTime.Now.ToString();
Response.Cookies["info"]["WebsiteName"].Value = "AIPDM";
Response.Cookies["info"]["color"].Value = "blue";
Response.Cookies["info"].Expires = DateTime.Now.AddDays(1);
D) None of the above.
Answer: C
A) Off B) InProc
C) StateServer D) SQLServer
Answer: B
6. You are creating an ASP.NET application for a company. You use form based authentication to
validate users. You need to prevent unauthenticated users from accessing the application. What
should you do?
A) In the authorization section of the Web.config file, set the users attribute of the deny element to “?”
B) Set In the authorization section of the Web.config file, set the users attribute of the deny element to “*”
C) In the authorization section of the Machine.config file, set the users attribute to the allow element to
“?”.
D) None of the above.
Answer: A
a. UpdatePanel ---------------
i. If Master Page contains a ScriptManager then content page
will use this control.
b. UpdateProgress ------------ ii. ContentTemplate
c. Timer --------------------- iii. ProgressTemplate
d. ScriptManagerProxy -------- iv. Tick Event
8. You are writing a page that contains an UpdatePanel for partial-page updates. You want that user
should get the message “Processing is going on, please wait.” that the update is processing only if
the update takes longer than 5 seconds. Which actions should you take?
A) Add a ProgressBar control to the page. Set the Interval property to 5000. Set the text property as
“Processing is going on, please wait.”
B) Add a Timer control to the page. Set the Interval property to 5000. Set its text property to Processing is
going on, please wait.”
C) Add an UpdateProgress control to the UpdatePanel. Set its DisplayAfter property to 5000. Set its
ProgressTemplate contents to read “Processing is going on, please wait.”
D) None of the above.
Answer: C
9. Which control is required inside a content page to reference ContentPlaceHolder control inside
the master page?
A) Content control on a content page. B) ContentPlaceHolder on a content page.
C) PlaceHolder control is required on content page. D) None of the above.
Answer: A
10. Cache["dd"]="asp.net";
A) Infinite B) 0 seconds
C) 20 seconds D) None of these
Answer: B
14. You are creating an ASP.NET MVC web application, and you decide to create a new layout for
mobile devices with relatively small screens. Which @media query should you create or modify to
accomplish the task? (Choose all that apply.)
15. You are implementing an ASP.NET MVC 2 Web application. The URL with path /Home/Details/
{country} will return a page that provides information about the named country. You need to
ensure that requests for this URL that contains an unrecognized country value will not be processed
by the Details action of HomeController.What should you do?
Q 16 - You are implementing an ASP.NET MVC 2 Web application. The URL with
path
/Home/Details/{country} will return a page that provides information about
the
named country. You need to ensure that requests for this URL that contains
an
unrecognized country value will not be processed by the Details action of
HomeController.What should you do?
A - Add the ValidateAntiForgeryToken attribute to the Details action method.
B - Add the Bind attribute to the country parameter of the Details action method. Set
the
attribute's Prefix property to Country.
C - Create a class that implements the IRouteConstraint interface. Configure the default
route to
use this class.
D - Create a class that implements the IRouteHandler interface. Configure the default
route to
use this class.
E - A and D both
F - All of the above