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 not displayed in a grid based on a querry string paramater named Product whose ProductName starts with the querry string value. You need to ensure that the page generates the appropriate database query. 
B. Option B
C. Option C
D. Option D
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 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 creating an ASP.NET Web site. The site contains pages that are available to anonymous users. The site also contains a page named Premium.aspx that provides premium content to only members of a group named Subscribers. You need to modify the web.config file to ensure that Premium.aspx can be accessed by only members of the Subscribers group.
Which configuration should you use?
You create a Web page that contains the following image element.
You need to write a JavaScript function that will dynamically change which image is displayed. The function must be compatible across different browsers.
Which code segment should you use?
A. function changeImage() {myImage.src = "image2.png"; }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 site using .NET Framework 4.0.
Only registered users of the company will be able to use the application. The application holds a page named UserAccount.aspx that enables new users to register them to the registered users` list of the company.
The UserAccount page hold numerous TextBox controls that accept users personal details, such as user name, password, home address, zipcode, phone number, etc. One of the TextBox controls on the page is named ZipCode in which a
user enters a zip code. You must ensure that when a user submits the UserAccount page, ZipCode must contain five numeric digits.
What will you do to accomplish this? (Each correct answer represents a part of the solution. Choose two.)
A. Use RangeValidator.You are implementing an ASP.NET MVC 2 Web application. The URL with path /Home/Details/ {country} will return a page that provides information about the named country. You need to ensure that requests for this URL that contain an unrecognized country value will not be processed by the Details action of HomeController.
What should you do?
A. Add the ValidateAntiForgeryToken attribute to the Details action method.You are implementing an ASP.NET Web application that retrieves data from a Microsoft SQL Server database. You add a page that includes the following data source control.
The page is accessed frequently, but the data in the database rarely changes. You need to cache the retrieved data so that the database is not queried each time the Web page is accessed.
What should you do?
A. Add the following attributes to the SqlDataSource control.DataSourceMode="DataSet"EnableCaching="True"CacheDuration="120"You are creating an ASP.NET Web site. The site has a master page named Custom.master. The code- behind file for Custom.master contains the following code segment.
public partial class CustomMaster : MasterPage { public string Region { get; set; } protected void Page_Load(object sender, EventArgs e) { } }
You create a new ASP.NET page and specify Custom.master as its master page. You add a Label control named lblRegion to the new page. You need to display the value of the master page's Region property in lblRegion.
What should you do?
A. Add the following code segment to the Page_Load method of the page code-behind file.CustomMaster custom = this.Parent as CustomMaster;lblRegion.Text = custom.Region;You have a master page custom.master ... u create a nested.master page using it ... and then u have content page that uses the nested.master as its master page ... to get a string prop from custom.master into a label in content page the code u wud use...
A. master.masterYou are developing an ASP.NET Web page. The page contains the following markup.
onrowdatabound="gvModels_RowDataBound" AutoGenerateColumns="false">
The pages code-behind file includes the following code segment. (Line numbers are included for reference only.)
01 protected void gvModels_RowDataBound(object sender, GridViewRowEventArgs e) 02 {
03 if (e.Row.RowType == DataControlRowType.DataRow)
04 {
05 CarModel cm = (CarModel)e.Row.DataItem;
07 img.ImageUrl = String.Format("images/{0}.jpg",
cm.ID);
09 }
10 }
You need to get a reference to the Image named img.
Which code segment should you add at line 06?
A. Image img = (Image)Page.FindControl("img");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.