You are implementing a WCF service library. You add a new code file that contains the following code segment.

You build the service library and deploy its assembly to an IIS application. You need to ensure that the GetCurrentRate method can be called from JavaScript.
What should you do?
A. Add a file named Service.svc to the IIS application. Add the following code segment to the file. < %@ ServiceHost Service="ContosoWCF.IRateService"Factory="System.ServiceModel.Activation.WebScriptServiceHo stFactory" %>You use the following declaration to add a Web user control named TestUserControl.ascx to an ASP.NET page named TestPage.aspx.
You add the following code to the code-behind file of TestPage.aspx.
Private Sub TestMethod()
End Sub
You define the following delegate.
Public Delegate Sub MyEventHandler()
You need to add an event of type MyEventHandler named MyEvent to TestUserControl.ascx and attach the pages TestMethod method to the event.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Add the following line of code to TestUserControl.ascx.vb.Public Event MyEvent As MyEventHandlerYou create a new ASP.NET MVC 2 Web application. The following default routes are created in the Global.asax.vb file. (Line numbers are included for reference only.)
01 Shared Sub RegisterRoutes(ByVal routes As RouteCollection) 03 routes.IgnoreRoute("{resource}.axd/{*pathInfo}")
05 routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
New With {.controller = "Home", .action = "Index", .id = ""} )
06 End Sub
You implement a controller named HomeController that includes methods with the following signatures.
Function Index() As ActionResult
Function Details(ByVal id As Integer) As ActionResult
Function DetailsByUsername(
ByVal username As String) As ActionResult
You need to add a route to meet the following requirements. ?The details for a user must 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?
A. Replace line 05 with the following code segment.routes.MapRoute("Default", "{controller}/ {action}/{id}", New With {.controller = "Home", .action = "DetailsByUsername",.id = ""})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?
A. Use the RowCommand event of the GridView control.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 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?
A. Replace line 05 with the following code segment.routes.MapRoute("Default", "{controller}/ {action}/{id}", new {controller ="Home", action = "DetailsByUsername", id = ""});You are developing an ASP.NET MVC 2 application.
You create a login user control named login.ascx.
You need to display Login.ascx in a view.
What should you do?
A. Use an HTML server-side include.Ajax extender
[TargetControlType(typeof(TextBox))] public class DisabledButtonExtender : ExtenderControlBase {
[ExtenderControlProperty]
[DefaultValue("")]
[IDReferenceProperty(typeof(Button))]
Create an extender that extends a textbox and assigns to a button;
Using wich combination?
Correct Answer. [TargetControlType(typeof(TextBox))][IDReferenceProperty(typeof(Button))]You are implementing an ASP.NET page. The page includes a method named GetCustomerOrderDataSet that returns a DataSet. The DataSet includes a DataTable named CustomerDetailsTable and a DataTable named OrderDetailsTable. You need to display the data in OrderDetailsTable in a DetailsView control named dtlView.
Which code segment should you use?
A. dtlView.DataSource = GetCustomerOrderDataSet()dtlView.DataMember = "OrderDetailsTable"dtlView.DataBind()You are developing an ASP.NET web page.
The page includes the following EntityDataSource control:
DefaultContainerName="AdventureWorksEntities" EnableFlattening="False" EntitySetName="Products" /> The page must filter the data that is displayed in a grid based on a query string parameter named ProductPrefix. The grid must display products whose ProductName starts with the query string value. You need to ensure that the page generates the appropriate database query. What should you do?
B. Add the following element to the EntityDataSource control:
C. Add the following element to the EntityDataSource control:
D. Add the following element to the EntityDataSource control:
You are perfoming security testing on an existing asp.net web page. You notice that you are able to issue unauthorised postback requests to the page. You need to prevent unauthorised post back requests. which page directive you use?
Nowadays, 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.