EnsurepassQUESTION 171 You are developing an ASP.Net MVC 2 view and controller. The controller includes an action method that retrieves rows from a Product table in Microsoft SQL Server database. You need to cache the data that the action method returns. What should you do? A. Add the following <outputCacheSettings> section to the web.config file. <system.web> <caching> <outputCacheSettings> <outputCacheProfiles> <add name="ProductView" duration="60" Read more [...]
EnsurepassQUESTION 161 ASP.net MVC dotn display a column Using LINQ to SQL class [MetadataType(typeof(ProductMetadata))] public pertial class Product { ... } public class ProductMetadata { ... } A. Add the following attribute to Product class [DisplayColumn("DiscontinueDate","DiscontinueDate",false) B. Add the following attribute to ProductMetadata class [DisplayColumn("DiscontinueDate","DiscontinueDate",false) C. Add the following code segment Read more [...]
EnsurepassQUESTION 151 You are implementing an ASP.NET Web page The page includes several controls, but only a GridView requires view state. You set the GridView… You need to ensure that the page will omit unneeded view state. Wich @ Page directive should you use? A. <% Page EnableViewState=”true” ViewStateMode=”Enabled” _ %> B. <% Page EnableViewState=”true” ViewStateMode=”Disabled” _ %> C. <% Page EnableViewState=”false” ViewStateMode=”Disabled” _ Read more [...]
EnsurepassQUESTION 141 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 application using .NET Framework 4.0. You create a Web page in the application. The Web page will get large sets of data from a data source. You add a DataPager control to the page. You are required to display navigation controls that enable you to create a custom paging Ul for the DataPager control. Read more [...]
EnsurepassQUESTION 131 Which class provides paging functionality for data-bound controls that implement the IPageableItemContainer interface? A. DataPagingField B. DataPagerCollection C. DataPager D. DataPaging Answer: C QUESTION 132 Which method of the Page class searches the page naming container for a server control with a particular identifer? A. FindFieldTemplate B. FindControl C. FindDataSourceControl D. FindDataControl Answer: B QUESTION 133 Which control allows you Read more [...]
EnsurepassQUESTION 121 Which of the following is the correct syntax to specify the path to a file that generates the strong type? A. <%@ PreviousPageType VirtualPath ="~/MyPage.aspx"% > B. <%@ PreviousPageType VirtualPath ="/MyPage.aspx/ ~"% > C. <%@ PreviousPageType VirtualPath ="~/MyPage.master"% > D. <%@ PreviousPageType VirtualPath ="~/MyPage"% > Answer: A You create an ASP.NET MVC 2 Web application using .NET Framework 4.0. Read more [...]
EnsurepassQUESTION 111 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 CONTOSOAppIdentity 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 be added to the existing database. The ContosoAppIdentity user must be granted only the minimum privileges that are required Read more [...]
EnsurepassQUESTION 101 You are developing an ASP.NET Web page that contains input controls, validation controls, and a button named btnSubmit. The page has the following code-behind. (Line numbers are included for reference only.) 01 public partial class _Default : System.Web.UI.Page 02 { 03 protected void SaveToDatabase() 04 { 05 06 } 07 8 protected void btnSubmit_Click(object sender, EventArgs e) 9 { 10 11 } 12 } You need to ensure that all data that is submitted passes validation Read more [...]
EnsurepassQUESTION 91 You are developing an ASP.NET Web page. The page includes a List<Product> instance. You add a FormView control to display a single Product from this list. You need to bind the list to the FormView control. Which FormView property should you set in the code-behind file? A. DataSource B. DataSourceID C. DataKeyNames D. DataMember Answer: A QUESTION 92 You are implementing an ASP.NET Web site that uses a custom server control named Task. Task is defined as Read more [...]
EnsurepassQUESTION 81 You are implementing an ASP.NET page that will retrieve large sets of data from a data source. You add a ListView control and a DataPager control to the page. You need to ensure that the data can be viewed one page at a time. What should you do? A. Set the DataPager control's PageSize property to the number of rows to view at one time. B. Set the DataPager control's PagedControlID property to the ID of the ListView control. C. In the codebehind file, set the DataPager control's Read more [...]
EnsurepassQUESTION 71 You create a Web page that contains the span shown in the following line of code. <span id="span1">Text</span> You need replace the contents of the span with HTML that you download from a URL specified by a global variable named localURL. Which code segment should you use? A. $.ajax({ type: "GET", url: localURL, dataType: "jsonp", success: function(htmlText) { $("#span1").text(htmlText); } }); B. $.ajax(localURL, Read more [...]