You need to ensure that the page generates the appropriate database query
You are developing an ASP.NET web page.
The page includes the following EntityDataSourcecontrol:
<asp:EntityDataSource ID=”EntityDataSource1″ runat=”server”
ConnectionString=”name=AdventureWorksEntities”
DefaultContainerName=”AdventureWorksEntities” EnableFlattening=”False”
EntitySetName=”Products” />
The page must filter the data that is displayed in a grid on a query string parameter named ProductPrefix.
The grid must display products whose ProductNamestarts with the query string value.
You need to ensure that the page generates the appropriate database query.
What should you do?
Which LINQ to Entities query should you use?
You are developing an ASP.NET web application.
The application includes the following Entity Data Model (EDM):
You instantiate an ObjectContextfor the EDM named context.
You need to find the total number of addresses thatare associated with customers that have a non-nullmiddle
name.
Which LINQ to Entities query should you use?
You need to ensure that the application can retrieve images from the database without blocking IIS worker proc
You are developing an ASP.NET web application that you will deploy to an Internet Information Services(IIS)
7.0 server.
The application will run in Integrated pipeline mode. The application contains a phot gallery of images that are
stored in a Microsoft SQL Server database.
You need to ensure that the application can retrieve images from the database without blocking IIS worker
process threads.
What should you do?
Which two actions should you perform?
You are adding new capabilities to an ASP.NET web site. The site currently connects to a Microsoft SQL
Server database by using the credentials
of the CONTOSO\AppIdentity account, which has been granted access to only objects within the database.
The application requires the following implementation:
Database objects that support ASP.NET roles must beadded to the existing database.
The Contoso\AppIdentity user must be granted only the minimum privileges that are required to support all
features of ASP.NET roles.
You need to add the ASP.NET roles support.
Which two actions should you perform? (Each correctanswer presents part of the complete solution. Choose
two.)
Which interface should you implement on the control?
You are developing an ASP.NET templated server control.
You need to ensure that a new ID namespace is created within the page control hierarchy when the control is
added to a page.
Which interface should you implement on the control?
Which control markup should you use?
You are implementing an ASP.NET page that includes a text box.
You need to validate values that are typed by usersto ensure that only numeric values are submitted.
Which control markup should you use?
Which two actions should you perform?
You are debugging an ASP.NET web page. The page includes the following method:
[WebMethod]
public string GetServerString()
{
…
}
The page also includes the following markup:
<asp:ScriptManager ID=”sm1″ runat=”server” />
The following JavaScript code is used to call the GetServerStringmethod:
function GetString() {
PageMethods.GetServerString(callbackMethod);
}
function callbackMethod(str) {
…
}
The AJAX calls to the GetServerStringmethod are failing.
You need to ensure that the AJAX call to the GetServerStringmethod succeeds.
Which two actions should you perform? (Each correctanswer presents part of the solution. Choose two.)
Which event should you handle?
You are developing an ASP.NET web page.
The page includes a DropDownList control.
You need to call a client-side function when the user changes the value of the control.
Which event should you handle?
You need to ensure that the extender can be user toextend only text boxes and that the targetID property can r
You are developing an ASP.NET AJAX extender control.
The extender includes the following segment.
public class DisabledButtonExtender : ExtenderControlBase
{
[ExtenderControlProperty]
public string TargetID
{
get{…}
set{…}
}
}
You need to ensure that the extender can be user toextend only text boxes and that the targetID property can
reference only buttons.
What should you do?
You need to ensure that the page displays a list ofsupervisors with their corresponding employees
You are updating an ASP.NET Web Application.
The application includes the fallowing classes.
public class Supervisor
{
public string FirstName { get; set; }
public string LastName { get; set; }
public List<Employee> Employees { get; set; }
}
public class Employee
{
public String FirstName { get; set; }
public String LastName { get; set; }
}
An application page contains the fallowing markup.
<asp:Repeater ID=”rptSupervisor” runat=”server”
DataSourceID=”odsEmployees”>
<ItemTemplate>
<%#Eval(“FirstName”) %> <%#Eval(“LastName”)%>
Employees:
<asp:Repeater ID=”rptEmployees” runat=”server”>
<ItemTemplate>
<%#Eval(“FirstName”) %> <%#Eval(“LastName”) %>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
<asp:ObjectDataSource ID=”odsEmployees” runat=”server” SelectMethod=”GetSupervisorWithEmployees”
TypeName=”BusinessLayer”>
</asp:ObjectDataSource>
You need to ensure that the page displays a list ofsupervisors with their corresponding employees.
What should you do?