单项选择题

You are implementing a read-only page that includes the following controls.
You disable view state to improve performance. You need to ensure that the page is updated to display the latest data when the user clicks the refresh button. Which code segment should you use?() 

A.protected void Page_PreInit(object sender, EventArgs e) { if (!IsPostBack) { gvCustomers.DataSource = GetCustomers();  gvCustomers.DataBind(); } }
B.protected void Page_Load(object sender, EventArgs e) { gvCustomers.DataSource = GetCustomers(); gvCustomers.DataBind(); }
C.protected void gvCustomers_DataBinding(object sender, EventArgs e) { gvCustomers.DataSource = GetCustomers(); gvCustomers.DataBind(); }
D.protected void Page_PreRender(object sender, EventArgs e) { if (!IsPostBack) { gvCustomers.DataSource = GetCustomers(); gvCustomers.DataBind(); } }


您可能感兴趣的试卷

你可能感兴趣的试题

2.单项选择题You are implementing an ASP.NET Web site that will be accessed by an international audience. The site contains global and local resources for display elements that must be translated into the language that is selected by the user. You need to ensure that the Label control named lblCompany displays text in the user’s selected language from the global resource file. Which control markup should you use?()

A.<asp:Label ID="lblCompany" runat="server" meta:resourcekey="lblCompany" />
B.<asp:Label ID="lblCompany" runat="server" Text="meta:lblCompany.Text" /> 
C.<asp:Label ID="lblCompany" runat="server" Text="<%$ Resources:lblCompanyText %>" />
D.<asp:Label ID="lblCompany" runat="server" Text="<%$ Resources:WebResources, lblCompanyText %>" />

5.单项选择题

You create an ASP.NET MVC 2 Web application that contains the following controller class.
In the Views folder of your application, you add a view page named Index.aspx that includes the following @ Page directive.

You test the application with a browser.You receive the following error message when the Index method is invoked: "The view 'Index' or its master was not found." You need to resolve the error so that the new view is displayed when the Index method is invoked.What should you do?()

A.Change the name of the Index.aspx file to Product.aspx.
B.Create a folder named Product inside the Views folder. Move Index.aspx to the Product folder.
C.Replace the @ Page directive in Index.aspx with the following value.
D.Modify the Index method by changing its signature to the following:public ActionResult Index(Product p)

9.单项选择题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.
B.Add the Bind attribute to the country parameter of the Details action method. Set the attribute’s Prefix property to Country.
C.Create a class that implements the IRouteConstraint interface. Configure the default route to use this class.
D.Create a class that implements the IRouteHandler interface. Configure the default route to use this class.

最新试题

Which control allows you to bind to data items that are returned from a data source and display them?()

题型:单项选择题

You develop an ASP.NET Web page that includes multiple WebPartZone controls, an EditorZone. Users report that they cannot customize the layout of the page by moving WebParts from one.You need to ensure that users can successfully move Web Parts from one zone to another. What should you do?()

题型:单项选择题

Which class is used to specify a set of features to support on the XrnlReader object created by the Create method?()

题型:单项选择题

You have to store user data of 200 KB in an object. Which state management technique to use:()

题型:单项选择题

You work as an ASP.NET Web Application Developer for SomeCompany. The company uses Visual Studio .NET 2010 as its application development platform. You have recently finished the development of an ASP.NET Web application using .NET Framework 4.0. Now, you are deploying the ASP.NET Web application to a remote server. You are required to select a deployment method that will make sure that all Internet Information Services (IIS) settings, in addition to the Web content, are deployed to the remote server. Which of the following deployment methods will you select to accomplish this?()

题型:单项选择题

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. What will you do?()

题型:单项选择题

In a web page with chechboxes you need to write e jquery that retruns the number checked checkboxes.()

题型:单项选择题

Which class defines the contract that ASP.NET implements to provide membership services using custom membership providers?()

题型:单项选择题

Which utility allows you to pre-compile and publish your Web site to a new location?()

题型:单项选择题

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()

题型:单项选择题