单选题You are implementing a Web page that displays text that was typed by a user. You need to display the user input in the Web page so that a cross-site scripting attack will be prevented. What should you do?()A Call document.write.B Call Response.Write.C

题目
单选题
You are implementing a Web page that displays text that was typed by a user. You need to display the user input in the Web page so that a cross-site scripting attack will be prevented. What should you do?()
A

Call document.write.

B

Call Response.Write.

C

Call HttpUtility.UrlEncode.

D

Call HttpUtility.HtmlEncode.


相似考题
更多“You are implementing a Web page that displays text that was ”相关问题
  • 第1题:

    You configure Microsoft Internet Explorer 7 with a Really Simple Syndication (RSS) subscription to MSN Entertainment on your computer. Your RSS subscription Web page fails to show the information that the RSS feed Web page displays from MSN Entertainment. You need to ensure that Internet Explorer displays the current content from the RSS feed.What should you do?()

    A.A

    B.B

    C.C

    D.D


    参考答案:B

  • 第2题:

    There are many forms of online advertising. ______ is a small rectangular object on a Web page that displays a stationary or moving graphic and includes a hyperlink to the advertiser's Web site.
    A.A text ad
    B.A site sponsorship ad
    C.A pop-up ad
    D.A banner ad


    答案:D
    解析:

  • 第3题:

    You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5.  You create a folder named Dark in the App_Themes folder of the Web application. You also addfour skin files to this folder. You have to make sure that the controls on a page have their appearances overridden by the control definitions defined in the skin files. What should you do?  Which Page directive should you use?()

    • A、You should use the page directive: <%@ Page StyleSheetTheme="App_Themes.Dark"/>
    • B、You should use the page directive: <%@ Page Theme="App_Themes.Dark"/>
    • C、You should use the page directive: <%@ Page Theme="Dark"/>
    • D、You should use the page directive: <%@ Page StyleSheetTheme="Dark"/>

    正确答案:C

  • 第4题:

    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 %>" />

    正确答案:D

  • 第5题:

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

    • A、<%@Page strict = "true" %>  
    • B、<%@Page enableViewStateMac = "true" %>
    • C、<%@Page EnableEventValidation = "true" %>
    • D、<%@Page Aspcompact = "true" %>

    正确答案:C

  • 第6题:

    You write a Web application. This application must support multiple languages. You store the localized strings in the application as resources. You want these resources to be accessed according to a users language preference. You create the following resource files in the App_GlobalResources folder of your application. myStrings.resx myStrings.en-CA.resx myString.en-US.resx myStrings.fr-CA.resx myStrings.es-MX.resxEach resource file stores a localized version of the following strings: Name, E-mail, Address, and Phone. You create a Web Form that contains one label for each of these strings. You need to ensure that the correct localized version of each string is displayed in each label, according to a users language preference. What should you do? ()

    • A、Add the following configuration section to the Web.config file.
    • B、Set the directive for each page in your site as follows: <%@ page="" uiculture="”Auto”">
    • C、Add the following code segment to the pages load event.lblName.Text = @”{myStrings}Name”; lblAddress.Text = @”{myStrings}Address”; lblEmail.Text = @”{myStrings}Email”; lblPhone.Text = @”{myStrings}Phone”;
    • D、Add the following code segment to the pages load event.lblName.Text = Resources.myStrings.Name; lblAddress.Text = Resources.myStrings.Address; lblEmail.Text = Resources.myStrings.Email; lblPhone.Text = Resources.myStrings.Phone;

    正确答案:D

  • 第7题:

    You are developing a Web application. The Web application restricts access to an administrative page. The Web application uses the following code segment to protect the page.if (Page.User.Identity.Name != @"CONTOSO/Administrator") { the page, you are redirected to Login.aspx. You discover that the User.Identity.Name property is not being correctly populated. You need to ensure that you can access the page when you are logged on as Administrator. Which two actions should you perform? ()

    • A、In the Web.config file, enable impersonation.
    • B、In IIS, enable anonymous access.
    • C、In IIS, disable anonymous access.
    • D、In the Web.config file, set the authentication mode to Windows.

    正确答案:C,D

  • 第8题:

    多选题
    You are developing a Web application. The Web application restricts access to an administrative page. The Web application uses the following code segment to protect the page.if (Page.User.Identity.Name != @"CONTOSO/Administrator") { the page, you are redirected to Login.aspx. You discover that the User.Identity.Name property is not being correctly populated. You need to ensure that you can access the page when you are logged on as Administrator. Which two actions should you perform? ()
    A

    In the Web.config file, enable impersonation.

    B

    In IIS, enable anonymous access.

    C

    In IIS, disable anonymous access.

    D

    In the Web.config file, set the authentication mode to Windows.


    正确答案: A,D
    解析: 暂无解析

  • 第9题:

    多选题
    You are implementing an ASP.NET Web application. Users will authenticate to the application with an ID. The application will allow new users to register for an account. The application will generate an ID for the user based on the users full name. You need to implement this registration functionality. Which two actions should you perform?()
    A

    Configure the SqlMembershipProvider in the web.config file.

    B

    Configure the SqlProfileProvider in the web.config file.

    C

    Create an ASP.NET page that contains a default CreateUserWizard control to create a new user account.

    D

    Create an ASP.NET page that contains a custom form that collects the user information and then uses the Membership.CreateUser method to create a new user account.


    正确答案: B,D
    解析: 暂无解析

  • 第10题:

    多选题
    You are developing a Web application. The Web application restricts access to an administrative page. The Web application uses the following code segment to protect the page.If Page.User.Identity.Name <> "CONTOSO/Administrator" Then Response.Redirect("login.aspx")End IfYou are logged on as Administrator. When you display the page, you are redirected to Login.aspx. You discover that the User.Identity.Name property is not being correctly populated. You need to ensure that you can access the page when you are logged on as Administrator. Which two actions should you perform? ()
    A

    In the Web.config file, enable impersonation.

    B

    In IIS, enable anonymous access.

    C

    In IIS, disable anonymous access.

    D

    In the Web.config file, set the authentication mode to Windows.


    正确答案: B,C
    解析: 暂无解析

  • 第11题:

    单选题
    You are testing an existing ASP.NET page. The page includes a text box. You are able to execute malicious JavaScript code by typing it in the text box and submitting. You need to configure the page to prevent JavaScript code from being submitted by the text box. In the @ Page directive, which attribute should you set to true?()
    A

    the EnableEventValidation attribute

    B

    the ResponseEncoding attribute

    C

    the ValidateRequest attribute

    D

    the Strict attribute


    正确答案: B
    解析: 暂无解析

  • 第12题:

    多选题
    You write a logging function for a Web Form. You call the logging function from the Page_Unload event handler. You test the Web Form and notice that the Page_Unload event handler does not call the logging function. You need to ensure that the logging function is called. What are two possible ways to achieve this goal? ()
    A

    Set the Page attribute to AutoEventWireup=False. Remove the attribute onunload=Page_Unload from the Web Form element.

    B

    Set the Page attribute to AutoEventWireup=False. Add the attribute OnUnload=Page_Unload to the Web Form element.

    C

    Set the Page attribute to AutoEventWireup=False. Add the Web Form attribute autocomplete=on.

    D

    Set the Page attribute to AutoEventWireup=True.


    正确答案: A,B
    解析: 暂无解析

  • 第13题:

    There are many forms of online advertising. ( )is a small rectangular object on a and includes a hyperlink to the Web page that displays a stationary or moving advertiser&39;s Web site.

    A.A text ad B.A site sponsorship ad C.A pop-up ad D.A banner ad


    正确答案:D

  • 第14题:

    When you are designing a Web application, which options define how rich text displays in a browser?()

    • A、"Using HTML"
    • B、"Using Java Applet"
    • C、"Using AJAX Control"
    • D、"Using Best Fit for OS"

    正确答案:C

  • 第15题:

    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” _ %>
    • D、<% Page EnableViewState=”false” ViewStateMode=”Enabled” _ %>

    正确答案:B

  • 第16题:

    You are implementing a Web page that displays text that was typed by a user. You need to display the user input in the Web page so that a cross-site scripting attack will be prevented. What should you do?()

    • A、Call document.write.
    • B、Call Response.Write.
    • C、Call HttpUtility.UrlEncode.
    • D、Call HttpUtility.HtmlEncode.

    正确答案:D

  • 第17题:

    You are testing an existing ASP.NET page. The page includes a text box. You are able to execute malicious JavaScript code by typing it in the text box and submitting. You need to configure the page to prevent JavaScript code from being submitted by the text box. In the @ Page directive, which attribute should you set to true?()

    • A、the EnableEventValidation attribute
    • B、the ResponseEncoding attribute
    • C、the ValidateRequest attribute
    • D、the Strict attribute

    正确答案:C

  • 第18题:

    You write a Web application. This application must support multiple languages. You store the localized strings in the application as resources. You want these resources to be accessed according to a users language preference. You create the following resource files in the App_GlobalResources folder of your application.myStrings.resxmyStrings.enCA.resxmyString.en-US.resxmyStrings.fr-CA.resxmyStrings.es-MX.resx resource file stores a localized version of the following strings: Name, E-mail, Address, and Phone. You create a Web Form that contains one label for each of these strings. You need to ensure that the correct localized version of each string is displayed in each label, according to a users language preference. What should you do? ()

    • A、Add the following configuration section to the Web.config file.
    • B、Set the directive for each page in your site as follows:<%@ page="" uiculture="“Auto”">
    • C、Add the following code segment to the pages load event.lblName.Text = @”{myStrings}Name”; lblAddress.Text = @”{myStrings}Address”; lblEmail.Text = @”{myStrings}Email”; lblPhone.Text = @”{myStrings}Phone”;
    • D、Add the following code segment to the pages load event. lblName.Text = Resources.myStrings.Name; lblAddress.Text = Resources.myStrings.Address; lblEmail.Text = Resources.myStrings.Email; lblPhone.Text = Resources.myStrings.Phone;

    正确答案:D

  • 第19题:

    单选题
    When you are designing a Web application, which options define how rich text displays in a browser?()
    A

    Using HTML

    B

    Using Java Applet

    C

    Using AJAX Control

    D

    Using Best Fit for OS


    正确答案: A
    解析: 暂无解析

  • 第20题:

    单选题
    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.Partial Public Class Custom  Inherits System.Web.UI.MasterPagePublic Property Region As String    Protected Sub Page_Load(ByVal sender As Object,ByVal e As System.EventArgs) Handles Me.LoadEnd SubEnd Class 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 pages 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. Dim custom As Custom = Me.Parent  lblRegion.Text = custom.Region

    B

    Add the following code segment to the Page_Load method of the page code-behind file. Dim custom As Custom = Me.Master  lblRegion.Text = custom.Region

    C

    Add the following code segment to the Page_Load method of the Custom.Master.vb code-behind file. Dim lblRegion As Label = Page.FindControl(lblRegion) lblRegion.Text = Me.Region

    D

    Add the following code segment to the Page_Load method of the Custom.Master.vb code-behind file. Dim lblRegion As Label = Master.FindControl(lblRegion) lblRegion.Text = Me.Region


    正确答案: C
    解析: 暂无解析

  • 第21题:

    单选题
    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” _ %>

    D

    <% Page EnableViewState=”false” ViewStateMode=”Enabled” _ %>


    正确答案: A
    解析: 暂无解析

  • 第22题:

    单选题
    You create a Web Form. The Web Form allows users to calculate values and display the results in a label named lblResults. You need to capture all unhandled exceptions on the Web Form through the Error event. The Error event must capture each unhandled exception and display it on the Web Form. Which code segment should you use?()
    A

    protected void Page_Error(object sender, EventArgs e) { lblResults.Text = e.ToString(); e=null;}

    B

    protected void Page_Error(object sender, EventArgs e) { lblResults.Text = Server.GetLastError().ToString(); Server.ClearError();}

    C

    protected void Page_Error(object sender, EventArgs e) Response.Write(e.ToString()); e=null;}

    D

    protected void Page_Error(object sender, EventArgs e) Response.Write(Server.GetLastError().ToString()); Server.ClearError();}


    正确答案: D
    解析: 暂无解析

  • 第23题:

    单选题
    You configure Microsoft Internet Explorer 7 with a Really Simple Syndication (RSS) subscription to MSN Entertainment on your computer.  Your RSS subscription Web page fails to show the information that the RSS feed Web page displays from MSN Entertainment.  You need to ensure that Internet Explorer displays the current content from the RSS feed.  What should you do?()
    A

    Enable the feed reading view in the RSS feed settings.

    B

    Configure the RSS feed properties to use the minimum interval value.

    C

    Configure the RSS feed properties to keep only the most recent 50 items.

    D

    Configure the RSS feed properties to automatically download attached files.


    正确答案: A
    解析: 暂无解析

  • 第24题:

    单选题
    You have a computer that runs Windows 7 and Windows Internet Explorer 8. You open Internet Explorerand access a Web site. The Web site displays a page that has misaligned text and graphic images. Youverify that the Web page displays correctly in previous versions of Internet Explorer.  You need to view theWeb page correctly. What should you do?()
    A

    Modify the text size.

    B

    Enable Caret Browsing.

    C

    Enable Compatibility View.

    D

    Disable the SmartScreen Filter.


    正确答案: B
    解析: 暂无解析