多选题You load an XmlDocument named doc with the following XML. Dictionary World Atlas You need to change the value for the genre attribute to NA for all book attributes. First, you add the following code segment to your class.Dim root As XmlElement = d

题目
多选题
You load an XmlDocument named doc with the following XML. Dictionary World Atlas You need to change the value for the genre attribute to NA for all book attributes. First, you add the following code segment to your class.Dim root As XmlElement = doc.DocumentElementDim nodes As XmlNodeList = root.SelectNodes("books/book")Which additional two code segments can you use to achieve this goal?()
A

Dim node As XmlNodeFor Each node In nodes node.Attributes(0).Value = NANext node

B

Dim node As XmlNodeFor Each node In nodes node.Attributes(1).Value = NANext node

C

Dim node As XmlNodeFor Each node In nodes Dim genre As XmlNode = node.SelectSingleNode(/genre) genre.Value = NANext node

D

Dim node As XmlNodeFor Each node In nodes Dim genre As XmlNode = node.SelectSingleNode(@genre) genre.Value = NANext node

E

Dim node As XmlNodeFor Each node In nodes Dim genre As XmlNode = node.SelectSingleNode(genre) genre.Value = NANext node


相似考题
更多“多选题You load an XmlDocument named doc with the following XML. Dictionary World Atlas You need to change the value for the genre attribute to NA for all book attributes. First, you add the following code segment to your class.Dim root As XmlElement = d”相关问题
  • 第1题:

    You are running Linux 2.0.36 and you need to add a USB mouse to your system. Which of the following statements is true?()

    • A、 You need to rebuild the kernel.
    • B、 You need to upgrade the kernel
    • C、 You need to load the USB modules for your existing modular kernel.
    • D、 USB support is not available in Linux.

    正确答案:B

  • 第2题:

    You are implementing an ASP.NET application that includes a page named TestPage.aspx. TestPage.aspx uses a master page named TestMaster.master.You add the following code to the TestPage.aspx code-behind file to read a TestMaster.master public property named CityName. Protected Sub Page_Load(ByVal sender As Object,ByVal e As System.EventArgs) Handles Me.LoadDim s As String = Master.CityNameEnd Sub  You need to ensure that TestPage.aspx can access the CityName property. What should you do?()

    • A、Add the following directive to TestPage.aspx. <%@ MasterType VirtualPath="~/TestMaster.master" %> 
    • B、Add the following directive to TestPage.aspx. <%@ PreviousPageType VirtualPath="~/TestMaster.master" %> 
    • C、Set the Strict attribute in the @ Master directive of the TestMaster.master page to true. 
    • D、Set the Explicit attribute in the @ Master directive of the TestMaster.master page to true. 

    正确答案:A

  • 第3题:

    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

    正确答案:B

  • 第4题:

    Your Web site processes book orders. One of the application methods contains the following code segment.Dim doc As New XmlDocument( )doc.LoadXml("10" &_"Dictionary")You need to remove the discount element from XmlDocument. Which two code segments can you use to achieve this goal? ()

    • A、Dim root As XmlNode = doc.DocumentElementroot.RemoveChild(root.FirstChild)
    • B、Dim root As XmlNode = doc.DocumentElementroot.RemoveChild(root.SelectSingleNode("discount"))
    • C、doc.RemoveChild(doc.FirstChild)
    • D、doc.DocumentElement.RemoveChild(doc.FirstChild)

    正确答案:A,B

  • 第5题:

    You create a Web Form. The Web Form allows users to log on to a Web site. You implement the login logic using a Login control named Login1. The membership data for the application is stored in a SQL Express database in the App_Data directory. You need to configure your application so that the membership data is stored in a local Microsoft SQL Server database. You add the following code segment to the Web.config file. Which two additional actions should you perform?()

    • A、Use Aspnet_regsql.exe to create the Microsoft SQL Server database.
    • B、Set Login1's MembershipProvider property to MySqlProviderConnection.
    • C、Add the following code segment to the Web.config file.<connectionStrings> <add name="MySqlProviderConnection" connectionString="valid connection string" /></connectionStrings>
    • D、Add the following code segment to the Web.config file.  <appSettings><add key="MySqlProviderConnection" value="valid connection string" /></appSettings>
    • E、In the ASP.NET configuration settings within IIS, ensure that Role Management Enabled is selected.
    • F、Use the Web Site Administration Tool to select AspNetSqlMembershipProvider as the membership provider for your application.

    正确答案:B,D

  • 第6题:

    You work as an application developer at Certkiller .com. You are currently in the process of creating a class that stores data about Certkiller .com’s customers. Certkiller .com customers are assigned unique identifiers and various characteristics that may include aliases, shipping instructions, and sales comments. These characteristics can change in both size and data type. You start by defining the Customer class as shown below: public class Customer { private int custID; private ArrayList attributes; public int CustomerID { get {return custID;} } public Customer (int CustomerID) { this.custID = CustomerID; this.attributes = new ArrayList (); } public void AddAttribute (object att) {  attributes.Add (att); } } You have to create the FindAttribute method for locating attributes in Customer objects no matter what the data type is.You need to ensure that the FindAttributemethod returns the attribute if found,and you also need to ensure type-safety when returning the attribute.What should you do?()

    • A、 Use the following code to declare the FindAttribute method: public T FindAttribute (T att) {//Find attribute and return the value }
    • B、 Use the following code to declare the FindAttribute method: public object FindAttribute (object att) {//Find attribute and return the value }
    • C、 Use the following code to declare the FindAttribute method: public T FindAttribute  (T att) {//Find attribute and return the value }
    • D、 Use the following code to declare the FindAttribute method: public string FindAttribute (string att) {//Find attribute and return the value }

    正确答案:C

  • 第7题:

    多选题
    Your Web site processes book orders. One of the application methods contains the following code segment. XmlDocument doc = newXmlDocument( ); doc.LoadXml(“10”+” Dictionary”); You need to remove the discount element from XmlDocument. Which two code segments can you use to achieve this goal? (Each correct answer presents a complete solution. ()
    A

    XmlNode root = doc.DocumentElement;root.RemoveChild(root.FirstChild);

    B

    XmlNode root = dec.DocumentElement;root.RemoveChild(root.SelectSingleNode(“discount”));

    C

    doc.RemoveChild(doc.FirstChild);

    D

    doc.DocumentElement.RemoveChild(doc.FirstChild);


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

  • 第8题:

    多选题
    You create a Web Form. The Web Form allows users to log on to a Web site. You implement the login logic using a Login control named Login1. The membership data for the application is stored in a SQL Express database in the App_Data directory. You need to configure your application so that the membership data is stored in a local Microsoft SQL Server database. You add the following code segment to the Web.config file. Which two additional actions should you perform? ()
    A

    Use Aspnet_regsql.exe to create the Microsoft SQL Server database.

    B

    Set Login1's MembershipProvider property to MySqlProviderConnection.

    C

    Add the following code segment to the Web.config file. <connectionStrings> <add name=MySqlProviderConnection connectionString=valid connection string /></connectionStrings>

    D

    Add the following code segment to the Web.config file. <appSettings><add key=MySqlProviderConnection value=valid connection string /></appSettings>

    E

    In the ASP.NET configuration settings within IIS, ensure that Role Management Enabled is selected.

    F

    Use the Web Site Administration Tool to select AspNetSqlMembershipProvider as the membership provider for your application.


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

  • 第9题:

    单选题
    You are implementing an ASP.NET MVC 2 application. In the Areas folder, you add a subfolder named Product to create a single project areA.  You add files named ProductController.vb and Index.aspx to the appropriate subfolders.  You then add a file named Route.vb to the Product folder that contains the following code.01 Public Class Route  Inherits AreaRegistration02  03 Public Overrides ReadOnly Property AreaName As String04 Get  05 Return "product"06 End Get  07 End Property08  09 Public Overrides Sub RegisterArea(ByVal context As AreaRegistrationContext)10  11 context.MapRoute("product_default", "product/{controller}/{action}/{id}", New With {.controller = "Product", .action = "Index",.id = ""})12  13 End Sub  End Class  When you load the URL http:///product, you discover that the correct page is not returned. You need to ensure that the correct page is returned. What should you do?()
    A

    Replace line 11 with the following code segment. context.MapRoute("product_default",   "{area}/{controller}/{action}/{id}", New With {.area = "product", .controller = "Product",   .action = "Index", .id = ""})

    B

    Replace line 11 with the following code segment. context.MapRoute("product_default",   "{area}", New With {.controller = "Product", .action = "Index", .id = ""})

    C

    Add the following code segment at line 12.  AreaRegistration.RegisterAllAreas()

    D

    Add the following code segment to the RegisterRoutes method in the Global.asax.vb file.   AreaRegistration.RegisterAllAreas()


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

  • 第10题:

    单选题
    You load an XmlDocument named doc with the following XML. World Atlas Dictionary You need to use an XPath query string to select the two book nodes. Which code segment should you use? ()
    A

    XmlElement root = doc.DocumentElement;XmlNodeList nodes = root.SelectNodes(“.”);

    B

    XmlElement root = doc.DocumentElement;XmlNodeList nodes = root.SelectNodes(“book”);

    C

    XmlElement root = doc.DocumentElement;XmlNodeList nodes = root.SelectNodes(“bookstore//book”);

    D

    XmlElement root = doc.DocumentElement;XmlNodeList nodes = root.SelectNodes(“books/book”);


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

  • 第11题:

    多选题
    You load an XmlDocument named doc with the following XML. Dictionary World Atlas You need to change the value for the genre attribute to NA for all book attributes. First, you add the following code segment to your class.Dim root As XmlElement = doc.DocumentElementDim nodes As XmlNodeList = root.SelectNodes("books/book")Which additional two code segments can you use to achieve this goal?()
    A

    Dim node As XmlNodeFor Each node In nodes node.Attributes(0).Value = NANext node

    B

    Dim node As XmlNodeFor Each node In nodes node.Attributes(1).Value = NANext node

    C

    Dim node As XmlNodeFor Each node In nodes Dim genre As XmlNode = node.SelectSingleNode(/genre) genre.Value = NANext node

    D

    Dim node As XmlNodeFor Each node In nodes Dim genre As XmlNode = node.SelectSingleNode(@genre) genre.Value = NANext node

    E

    Dim node As XmlNodeFor Each node In nodes Dim genre As XmlNode = node.SelectSingleNode(genre) genre.Value = NANext node


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

  • 第12题:

    单选题
    You are running Linux 2.0.36 and you need to add a USB mouse to your system. Which of the following statements is true?()
    A

     You need to rebuild the kernel.

    B

     You need to upgrade the kernel

    C

     You need to load the USB modules for your existing modular kernel.

    D

     USB support is not available in Linux.


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

  • 第13题:

    You load an XmlDocument named doc with the following XML. Dictionary World Atlas You need to change the value for the genre attribute to NA for all book attributes. First, you add the following code segment to your class. XmlElement root = doc.DocumentElement; XmlNodelist nodes = root.SelectNodes(“books/book”); Which additional two code segments can you use to achieve this goal? ()

    • A、foreach (XmlNode node in nodes){ node.Attributes[0].Value = “NA”;}
    • B、foreach (XmlNode node in nodes){ node.Attributes[1].Value = “NA”;}
    • C、foreach (XmlNode node in nodes){XmlNode genre = node.SelectSingleNode(“/genre”); genre.Value = “NA”;}
    • D、foreach (XmlNode node in nodes){XmlNode genre = node.SelectSingleNode(“@genre”); genre.Value = “NA”;}
    • E、foreach (XmlNode node in nodes){XmlNode genre = node.SelectSingleNode(“genre”); genre.Value = “NA”;}

    正确答案:A,D

  • 第14题:

    You load an XmlDocument named doc with the following XML. World Atlas Dictionary You need to use an XPath query string to select the two book nodes. Which code segment should you use? ()

    • A、XmlElement root = doc.DocumentElement;XmlNodeList nodes = root.SelectNodes(“.”);
    • B、XmlElement root = doc.DocumentElement;XmlNodeList nodes = root.SelectNodes(“book”);
    • C、XmlElement root = doc.DocumentElement;XmlNodeList nodes = root.SelectNodes(“bookstore//book”);
    • D、XmlElement root = doc.DocumentElement;XmlNodeList nodes = root.SelectNodes(“books/book”);

    正确答案:D

  • 第15题:

    You create a Web page named TestPage.aspx and a user control named TestUserControl.ascx. TestPage.aspx uses TestUserControl.ascx as shown in the following line of code. On TestUserControl.ascx, you need to add a read-only member named CityName to return the value "New York". You also must add code to TestPage.aspx to read this value. Which two actions should you perform?()

    • A、Add the following line of code to the TestUserControl.ascx.cs code-behind file. public string CityName { get { return "New York"; } } 
    • B、Add the following line of code to the TestUserControl.ascx.cs code-behind file. protected readonly string CityName = "New York"; 
    • C、Add the following code segment to the TestPage.aspx.cs code-behind file. protected void Page_Load(object sender, EventArgs e) { string s = testControl.CityName; } 
    • D、Add the following code segment to the TestPage.aspx.cs code-behind file. protected void Page_Load(object sender, EventArgs e) { string s = testControl.Attributes["CityName"]; } 

    正确答案:A,C

  • 第16题:

    Your Web site processes book orders. One of the application methods contains the following code segment. XmlDocument doc = newXmlDocument( ); doc.LoadXml(“10”+” Dictionary”); You need to remove the discount element from XmlDocument. Which two code segments can you use to achieve this goal? (Each correct answer presents a complete solution. ()

    • A、XmlNode root = doc.DocumentElement;root.RemoveChild(root.FirstChild);
    • B、XmlNode root = dec.DocumentElement;root.RemoveChild(root.SelectSingleNode(“discount”));
    • C、doc.RemoveChild(doc.FirstChild);
    • D、doc.DocumentElement.RemoveChild(doc.FirstChild);

    正确答案:A,B

  • 第17题:

    You load an XmlDocument named doc with the following XML. World Atlas Dictionary You need to use an XPath query string to select the two book nodes. Which code segment should you use? ()

    • A、Dim root As XmlElement = doc.DocumentElementDim nodes As XmlNodeList = root.SelectNodes(".")
    • B、Dim root As XmlElement = doc.DocumentElementDim nodes As XmlNodeList = root.SelectNodes("book")
    • C、Dim root As XmlElement = doc.DocumentElementDim nodes As XmlNodeList = root.SelectNodes("bookstore//book")
    • D、Dim root As XmlElement = doc.DocumentElementDim nodes As XmlNodeList = root.SelectNodes("books/book")

    正确答案:D

  • 第18题:

    You are implementing an ASP.NET MVC 2 application. In the Areas folder, you add a subfolder named Product to create a single project areA.  You add files named ProductController.vb and Index.aspx to the appropriate subfolders.  You then add a file named Route.vb to the Product folder that contains the following code.01 Public Class Route  Inherits AreaRegistration02  03 Public Overrides ReadOnly Property AreaName As String04 Get  05 Return "product"06 End Get  07 End Property08  09 Public Overrides Sub RegisterArea(ByVal context As AreaRegistrationContext)10  11 context.MapRoute("product_default", "product/{controller}/{action}/{id}", New With {.controller = "Product", .action = "Index",.id = ""})12  13 End Sub  End Class  When you load the URL http:///product, you discover that the correct page is not returned. You need to ensure that the correct page is returned. What should you do?()

    • A、Replace line 11 with the following code segment. context.MapRoute("product_default",   "{area}/{controller}/{action}/{id}", New With {.area = "product", .controller = "Product",   .action = "Index", .id = ""})
    • B、Replace line 11 with the following code segment. context.MapRoute("product_default",   "{area}", New With {.controller = "Product", .action = "Index", .id = ""})
    • C、Add the following code segment at line 12.  AreaRegistration.RegisterAllAreas()
    • D、Add the following code segment to the RegisterRoutes method in the Global.asax.vb file.   AreaRegistration.RegisterAllAreas()

    正确答案:A

  • 第19题:

    单选题
    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
    解析: 暂无解析

  • 第20题:

    单选题
    You load an XmlDocument named doc with the following XML. World Atlas Dictionary You need to use an XPath query string to select the two book nodes. Which code segment should you use? ()
    A

    Dim root As XmlElement = doc.DocumentElementDim nodes As XmlNodeList = root.SelectNodes(.)

    B

    Dim root As XmlElement = doc.DocumentElementDim nodes As XmlNodeList = root.SelectNodes(book)

    C

    Dim root As XmlElement = doc.DocumentElementDim nodes As XmlNodeList = root.SelectNodes(bookstore//book)

    D

    Dim root As XmlElement = doc.DocumentElementDim nodes As XmlNodeList = root.SelectNodes(books/book)


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

  • 第21题:

    多选题
    You create a Web page named TestPage.aspx and a user control named TestUserControl.ascx. TestPage.aspx uses TestUserControl.ascx as shown in the following line of code. On TestUserControl.ascx, you need to add a read-only member named CityName to return the value "New York". You also must add code to TestPage.aspx to read this value. Which two actions should you perform?()
    A

    Add the following line of code to the TestUserControl.ascx.cs code-behind file. public string CityName { get { return New York; } }

    B

    Add the following line of code to the TestUserControl.ascx.cs code-behind file. protected readonly string CityName = New York;

    C

    Add the following code segment to the TestPage.aspx.cs code-behind file. protected void Page_Load(object sender, EventArgs e) { string s = testControl.CityName; }

    D

    Add the following code segment to the TestPage.aspx.cs code-behind file. protected void Page_Load(object sender, EventArgs e) { string s = testControl.Attributes[CityName]; }


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

  • 第22题:

    多选题
    You load an XmlDocument named doc with the following XML. Dictionary World Atlas You need to change the value for the genre attribute to NA for all book attributes. First, you add the following code segment to your class. XmlElement root = doc.DocumentElement; XmlNodelist nodes = root.SelectNodes(“books/book”); Which additional two code segments can you use to achieve this goal? ()
    A

    foreach (XmlNode node in nodes){ node.Attributes[0].Value = “NA”;}

    B

    foreach (XmlNode node in nodes){ node.Attributes[1].Value = “NA”;}

    C

    foreach (XmlNode node in nodes){XmlNode genre = node.SelectSingleNode(“/genre”); genre.Value = “NA”;}

    D

    foreach (XmlNode node in nodes){XmlNode genre = node.SelectSingleNode(“@genre”); genre.Value = “NA”;}

    E

    foreach (XmlNode node in nodes){XmlNode genre = node.SelectSingleNode(“genre”); genre.Value = “NA”;}


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

  • 第23题:

    多选题
    Your Web site processes book orders. One of the application methods contains the following code segment.Dim doc As New XmlDocument( )doc.LoadXml("10" &_"Dictionary")You need to remove the discount element from XmlDocument. Which two code segments can you use to achieve this goal? ()
    A

    Dim root As XmlNode = doc.DocumentElementroot.RemoveChild(root.FirstChild)

    B

    Dim root As XmlNode = doc.DocumentElementroot.RemoveChild(root.SelectSingleNode(discount))

    C

    doc.RemoveChild(doc.FirstChild)

    D

    doc.DocumentElement.RemoveChild(doc.FirstChild)


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

  • 第24题:

    单选题
    You create a Web Form that allows users to create a new account. You add a CreateUserWizard control by using the following code segment.You need to ensure that the wizard automatically sends an e-mail message to users when they finish creating their accounts. You add a valid element to the Web.config file. Which code segment should you add to the Page_Load event?()
    A

     Wizard1.RequireEmail = True

    B

     Wizard1.Email = user@address.com

    C

     Wizard1.MailDefinition.From = registration@mysite.com

    D

     SmtpMail.SmtpServer = mail.contoso.com


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