Which method of the Page class searches the page naming container for a server control with a particular identifer?
A. FindFieldTemplateYou 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.
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.)
A. Add the following attribute to the AddressType field.[XmlAttribute]You are implementing an ASP.NET application that makes extensive use of JavaScript libraries. Not all pages use all scripts, and some scripts depend on other scripts. When these libraries load sequentially, some of your pages load too slowly. You need to use the ASP.NET Ajax Library Script Loader to load these scripts in parallel.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. In your site's master page, add a call to Sys.loader.defineScripts to define each of the scripts that are used in the site.You are developing an ASP.NET Web service. The following code segment implements the service.
(Line numbers are included for reference only.)
01 [WebServiceBinding(ConformsTo =
WsiProfiles.BasicProfile1_1)]
02 public class ProductService :
System.Web.Services.WebService
03 {
04 [WebMethod]
05 public Product GetProduct(string name)
06 {
08 }
10 [WebMethod]
11 public Product GetProduct(int id)
12 {
14 }
15 }
You need to ensure that both GetProduct methods can be called from a Web client.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Remove line 01.You are developing an ASP.NET Web page.
You add a data-bound GridView control. The GridView contains a TemplateField that includes a DropDownList. You set the GridViews ClientIDMode property to Static, and you set the ClientIDRowSuffix property to ProductID.
You need to be able to reference individual DropDownList controls from client-side script by using the ProductID.
What should you set the ClientIDMode property of the DropDownList to?
A. AutoIDYou are implementing an ASP.NET application that uses LINQ to Entities to access and update the database.
The application includes the following method to update a detached entity of type Person.
private NorthwindContext _entities;
public void UpdatePerson(Person personToEdit)
{
}
You need to implement the UpdatePerson method to update the database row that corresponds to the personToEdit object.
Which code segment should you use?
A. _entities.People.Attach(personToEdit);_entities.ObjectStateManager.ChangeObjectState (personToEdit, EntityState.Modified);_entities.SaveChanges();You are dynamically adding controls to an ASP.NET page in the Page_Load event handler. The page will have text boxes that correspond to the columns in a database table. Each text box will be preceded by a label that displays the name of
the corresponding column.
You need to create the form so that when the user clicks the label, the corresponding text box is selected for input.
What should you do?
A. For each column, output the following HTML, where COL is replaced by the name of the column.COLYou are developing a Web page. The user types a credit card number into an input control named cc and clicks a button named submit. The submit button sends the credit card number to the server. A JavaScript library includes a
CheckCreditCard function that returns a value of true if the credit card appears to be valid, based on its checksum.
You need to ensure that the form cannot be used to submit invalid credit card numbers to the server.
What should you do?
A. Configure the input control to run on the server. On the submit button, add a server-side OnClick handler that calls CheckCreditCard and rejects the form submission if the input is invalid.You are implementing an ASP.NET application that uses LINQ to Entities to access and update the database. The application includes the following method to update a detached entity of type Person.
private NorthwindContext _entities;
public void UpdatePerson(Person personToEdit)
{
}
You need to implement the UpdatePerson method to update the database row that corresponds to the personToEdit object.
Which code segment should you use?
A. _entities.People.Attach(personToEdit); _entities.ObjectStateManager.ChangeObjectState( personToEdit, EntityState.Modified); _entities.SaveChanges();You are implementing an ASP.NET application that includes the following requirements. Retrieve the number of active bugs from the cache, if the number is present. If the number is not found in the cache, call a method named GetActiveBugs, and save the result under the ActiveBugs cache key. Ensure that cached data expires after 30 seconds. You need to add code to fulfill the requirements.
Which code segment should you add?
A. Dim numOfActiveBugs As Integer? = DirectCast(Cache("ActiveBugs"), Integer?) If Not numOfActiveBugs.HasValue Then Dim result As Int32 = GetActiveBugs() Cache.Insert("ActiveBugs", result, Nothing, DateTime.Now.AddSeconds(30), Cache.NoSlidingExpiration) numOfActiveBugs = result End If ActiveBugs = numOfActiveBugs.ValueNowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Microsoft exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 70-515 exam preparations and Microsoft certification application, do not hesitate to visit our Vcedump.com to find your solutions here.