Microsoft TS: Web Applications Development with Microsoft .NET Framework 4 - 070-515 Exam Practice Test

Which utility allows you to pre-compile and publish your Web site to a new location?
Correct Answer: A
You are developing an ASP.NET web page named WebPage.aspx.
The page includes a user control named UserInfoControl.ascx.
You need to expose a control property named FirstName and read its value from the page.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Correct Answer: B,D
You create an ASP.NET MVC 2 Web application.
You implement a single project area in the application.
In the Areas folder, you add a subfolder named Test.
You add files named TestController.cs and Details.aspx to the appropriate subfolders.
You register the area's route, setting the route name to test_default and the area name to test.
You create a view named Info.aspx that is outside the test area.
You need to add a link to Info.aspx that points to Details.aspx.
Which code segment should you use?
Correct Answer: C
You create an ASP.NET MVC 2 Web application that contains the following controller class.
public class ProductController : Controller { static List<Product> products = new List<Product>();
public ActionResult Index() { return View(); } }
In the Views folder of your application, you add a view page named Index.aspx that includes the following @ Page directive.
<%@ Page Inherits="System.Web.Mvc.ViewPage" %>
You test the application with a browser.
You receive the following error message when the Index method is invoked: "The view 'Index' or its master
was not found."
You need to resolve the error so that the new view is displayed when the Index method is invoked.
What should you do?
Correct Answer: D
You work as an ASP.NET Web Application Developer for SomeCompany.
The company uses Visual Studio .NET 2010 as its application development platform.
You are creating an ASP.NET Web application using .NET Framework 4.0.
The Web application comprises a class named Employee with properties named as First Name, Last
Name, and Age.
You add a Web page in which you get a list of Employee objects and display those objects in a GridView
control.
You are required to add code so that the GridView row is highlighted in red color if the age of the employee
is less than 21 years.
What will you do to accomplish this?
Correct Answer: A
You are deploying an ASP.NET Web application to a remote server.
You need to choose a deployment method that will ensure that all IIS settings, in addition to the Web
content, will deploy to the remote server.
Which deployment method should you choose?
Correct Answer: D
You create a new ASP.NET MVC 2 Web application.
The following default routes are created in the Global.asax.cs file. (Line numbers are included for reference
only.)
01 public static void RegisterRoutes(RouteCollection routes)
02 {
03 routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
05 routes.MapRoute("Default", "{controller}/{action}/{id}", new {controller
= "Home", action = "Index", id = ""});
06 }
You implement a controller named HomeController that includes methods with the following signatures.
public ActionResult Index()
public ActionResult Details(int id)
public ActionResult DetailsByUsername(string username)
You need to add a route to meet the following requirements.
The details for a user must to be displayed when a user name is entered as the path by invoking the
DetailsByUsername action.
User names can contain alphanumeric characters and underscores, and can be between 3 and 20 characters long.
What should you do?
Correct Answer: A
You create a new ASP.NET MVC 2 Web application.
The following default routes are created in the Global.asax.cs file. (Line numbers are included for reference
only.)
01 public static void RegisterRoutes(RouteCollection routes)
02 {
03 routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
05 routes.MapRoute("Default", "{controller}/{action}/{id}", new {controller
= "Home", action = "Index", id = ""});
06 }
You implement a controller named HomeController that includes methods with the following signatures.
public ActionResult About() public ActionResult Index() public ActionResult Details(int id)
You need to ensure that the About action is invoked when the root URL of the site is accessed. What should you do?
Correct Answer: B
You work as an ASP.NET Web Application Developer for SomeCompany.
The company uses Visual Studio .NET 2010 as its application development platform.
You create an ASP.NET Web application using .NET Framework 4.0.
The ASP.NET application is used to track employee performance.
It uses Microsoft Windows authentication.
Employees are members of a group named Employees.
Managers are members of a group named Managers.
The root folder of the application is named Details.
The Details folder displays information about employees' performance.
The Details folder has a subfolder named MoreDetails.
You need to ensure that employees and managers can access pages stored in the Details folder.
However, only managers can access pages stored in the MoreDetails folder.
You make the following entries in the Web.config file in the Details folder.
(Line numbers are given for reference only.)
1 <authentication mode="Windows" / >
2 <authorization>
3 <allow roles="Employees, Managers" / >
4 <deny users="*" />
5 </authorization>
You make the following entries in the Web.config file in the MoreDetails folder.
(Line numbers are given for reference only.)
1 <authentication="Windows" />
2 <authorization>
3 <allow roles="Managers" />
4 <deny users="*" />
5 </authorization>
When managers try to access pages stored in the MoreDetails folder, they receive the following error message:
"An error occurred during the processing of a configuration file required to service this request."
You must ensure that managers are able to access pages stored in the MoreDetails folder. What will you do to accomplish this?
Correct Answer: B
jQuery CheckBoxes In a web page with chechboxes you need to write e jquery that retruns the number checked checkboxes
Correct Answer: C
Explanation: Only visible for TrainingDump members. You can sign-up / login (it's free).
0
0
0
0