Microsoft TS: Web Applications Development with Microsoft .NET Framework 4 - 070-515 FREE EXAM DUMPS QUESTIONS & ANSWERS
You create a custom server control named Task that contains the following code segment. (Line numbers are included for reference only.)
01 namespace DevControls
02 {
03 public class Task : WebControl
04 {
05 [DefaultValue("")]
06 public string Title { ... }
07
08 protected override void RenderContents(HtmlTextWriter output)
09 {
10 output.Write(Title);
11 }
12 }
13 }
You need to ensure that adding a Task control from the Toolbox creates markup in the following format.
<Dev:Task ID="Task1" runat="server" Title="New Task" />
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
01 namespace DevControls
02 {
03 public class Task : WebControl
04 {
05 [DefaultValue("")]
06 public string Title { ... }
07
08 protected override void RenderContents(HtmlTextWriter output)
09 {
10 output.Write(Title);
11 }
12 }
13 }
You need to ensure that adding a Task control from the Toolbox creates markup in the following format.
<Dev:Task ID="Task1" runat="server" Title="New Task" />
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Correct Answer: A,C
Vote an answer
You are developing an ASP.NET Web application.
You create a master page.
The master page requires a region where you can add page-specific content by using the ASP.NET page
designer.
You need to add a control to the master page to define the region.
Which control should you add?
You create a master page.
The master page requires a region where you can add page-specific content by using the ASP.NET page
designer.
You need to add a control to the master page to define the region.
Which control should you add?
Correct Answer: C
Vote an answer
You are implementing an ASP.NET Web site. The site contains the following class.
public class Address
{ public int AddressType; public string Line1; public string Line2; public string City; public string ZipPostalCode;
}
The Web site interacts with an external data service that requires Address instances to be given in the following XML format.
<Address AddressType="2"> <Line1>250 Race Court</Line1> <City>Chicago</City> <ZipCode>60603</ZipCode>
</Address>
You need to ensure that Address instances that are serialized by the XmlSerializer class meet the XML
format requirements of the external data service.
Which two actions should you perform (Each correct answer presents part of the solution. Choose two.)
public class Address
{ public int AddressType; public string Line1; public string Line2; public string City; public string ZipPostalCode;
}
The Web site interacts with an external data service that requires Address instances to be given in the following XML format.
<Address AddressType="2"> <Line1>250 Race Court</Line1> <City>Chicago</City> <ZipCode>60603</ZipCode>
</Address>
You need to ensure that Address instances that are serialized by the XmlSerializer class meet the XML
format requirements of the external data service.
Which two actions should you perform (Each correct answer presents part of the solution. Choose two.)
Correct Answer: A,C
Vote an answer
You are developing an ASP.NET application by using Visual Studio 2010.
You need to interactively debug the entire application.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
You need to interactively debug the entire application.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Correct Answer: A,C
Vote an answer
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?
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
Vote an answer
You are developing an ASP.NET Web page that uses jQuery validation.
The user should enter a valid email address in a text box that has ID txtEmail. The page must display "E-
Mail address required" when the user does not enter an address and "Invalid e-mail address" when the user
enters an address that is not formatted properly.
You need to ensure that the appropriate error message is displayed when the text box does not contain a
valid e-mail address.
Which two code segments should you add? (Choose 2)
The user should enter a valid email address in a text box that has ID txtEmail. The page must display "E-
Mail address required" when the user does not enter an address and "Invalid e-mail address" when the user
enters an address that is not formatted properly.
You need to ensure that the appropriate error message is displayed when the text box does not contain a
valid e-mail address.
Which two code segments should you add? (Choose 2)
Correct Answer: A,C
Vote an answer
Explanation: Only visible for FreeCram members. You can sign-up / login (it's free).
You are developing an ASP.NET web application.
The application includes the following Entity Data Model (EDM): You instantiate an ObjectContext for the EDM named context.

You need to find the total number of addresses that are associated with customers that have a non-null middle name.
Which LINQ to Entities query should you use?
The application includes the following Entity Data Model (EDM): You instantiate an ObjectContext for the EDM named context.

You need to find the total number of addresses that are associated with customers that have a non-null middle name.
Which LINQ to Entities query should you use?
Correct Answer: A
Vote an answer
You are implementing an ASP.NET application. You add the following code segment.
public List<Person> GetNonSecretUsers()
{ string[] secretUsers = {"@secretUser", "@admin", "@root"}; List<Person> allpeople = GetAllPeople(); ...
}
You need to add code to return a list of all Person objects except those with a UserId that is contained in the secretUsers list.
The resulting list must not contain duplicates. Which code segment should you use?
public List<Person> GetNonSecretUsers()
{ string[] secretUsers = {"@secretUser", "@admin", "@root"}; List<Person> allpeople = GetAllPeople(); ...
}
You need to add code to return a list of all Person objects except those with a UserId that is contained in the secretUsers list.
The resulting list must not contain duplicates. Which code segment should you use?
Correct Answer: D
Vote an answer
Which of the following is the correct collection of build events?
Correct Answer: B
Vote an answer