Exam 70-562 : Microsoft .NET Framework 3.5, ASP.NET Application Development – 13

Question: You work as a Web Developer at Company.com. You are in the process of creating a Web application that uses Microsoft ASP.NET 3.5. You add a Button control to a page. You want to configure the Button control to display a confirmation message box when it is clicked. The Button control should only perform a postback when the client clicks OK in the confirmation message box. What should you do?

  1. You should use the declaration:
    <asp:Button runat=”server” Text=”Submit” OnClientClick=”confirm(‘Please Confirm?’); return
    true;”/>
  2. You should use the declaration:
    <asp:Button runat=”server” Text=”Submit” OnClientClick=”confirm(‘Please Confirm?’)”/>
  3. You should use the declaration:
    <asp:Button runat=”server” Text=”Submit” OnClientClick=”return confirm(‘Please Confirm?’)”/>
  4. You should use the declaration:
    <asp:Button runat=”server” Text=”Submit” OnClientClick=”confirm(‘Please Confirm?’); return false;”/>

Correct Answer: 3


Question: You work as an application developer at Company.com. You are currently creating a Microsoft ASP.NET application that uses Microsoft .NET Framework 3.5. Your application contains the following code:

<asp:DropDownList AutoPostBack="true" ID="TestList" runat="server" onselectedindexchanged="TestList_SelectedIndexChanged">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
</asp:DropDownList> 

The Web page contains a MultiView control named CKView. CKView consists of three child View controls. Management wants you to make sure that a DropDownList control named TestList can be used to select the View controls. What should you do?

  1. Your best option would be to make use of:
    Dim lInd As Integer = Integer.Parse(TestList.SelectedValue)
    CKView.ActiveViewIndex = lInd
  2. Your best option would be to make use of:
    Dim lInd As Integer = TestList.SelectedIndex
    CKView.ActiveViewIndex = lInd
  3. Your best option would be to make use of:
    Dim lInd As Integer = Integer.Parse(TestList.SelectedValue)
    CKView.Views(lInd).Visible = True
  4. Your best option would be to make use of:
    Dim lInd As Integer = TestList.SelectedIndex
    CKView.Views(lInd).Visible = True

Correct Answer: 2


Question: You work as an application developer at Company.com. You are currently creating anASP.NET application that uses Microsoft .NET Framework 3.5. The Web page of the application contains a DropDown List control named KingList. You write the code segment below in the application:

<asp:DropDownList AutoPostBack="true" ID="KingList" runat="server" onselectedindexchanged="KingList_SelectedIndexChanged">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
</asp:DropDownList> 

You decide to add a MultiView control named TestView to the Web page. TestView consists of three child View controls. To ensure productivity you need to make sure that the View controls can be selected using KingList. What should you do?

  1. Your best option would be to use:
    int lInd = int.Parse(KingList.SelectedValue);
    TestView.ActiveViewIndex = lInd;
  2. Your best option would be to use:
    int lInd = KingList.SelectedIndex;
    TestView.Views[lInd].Visible = true;
  3. Your best option would be to use:
    int lInd = int.Parse(KingList.SelectedValue);
    TestView.Views[lInd].Visible = true;
  4. Your best option would be to use:
    int lInd = KingList.SelectedIndex;
    TestView.ActiveViewIndex = lInd;

Correct Answer: 4


Question: You work as a Web Application Developer at Company.com. You make use of .NET Framework 3.5 in order to create an ASP.NET application. ou use the BaseValidator class to derive a new validation control with the following validation logic:

protected static bool Validate(string value) {
...
} 

You receive an instruction to override the validation method of the related control. What should you do?

  1. Your best option would be to use the following method:
    protected override bool ControlPropertiesValid() {
    string value = GetControlValidationValue(
    this.Attributes[“ControlToValidate”]);
    bool isValid = Validate(value);
    this.PropertiesValid = isValid;
    return true;
    }
  2. Your best option would be to use the following method:
    protected override bool ControlPropertiesValid() {
    string value = GetControlValidationValue(this.ValidationGroup);
    bool isValid = Validate(value);
    return isValid;
    }
  3. Your best option would be to use the following method:
    protected override bool EvaluateIsValid() {
    string value = GetControlValidationValue(this.ControlToValidate);
    bool isValid = Validate(value);
    return isValid;
    }
  4. Your best option would be to use the following method:
    protected override bool EvaluateIsValid() {
    string value = GetControlValidationValue(
    this.Attributes[“ControlToValidate”]);
    bool isValid = Validate(value);
    this.PropertiesValid = isValid;
    return true;
    }

Correct Answer: 3


Question: You work as a Web Developer at Company.com. You make use of Microsoft ASP.NET 3.5 to create a Web application. The code below exists in the application:

using (XmlWriter writer = XmlWriter.Create("CKData.xml"))
{
writer.WriteStartElement("ExamMananager");
writer.WriteAttributeString("Version", "4.1.0.0");
writer.WriteAttributeString("Year", "2008");
writer.WriteElementString("Description", "2008 Exam Manager");
writer.WriteEndElement();
} 

Identify the XML output that will be created by this code?

  1. The code will create this XML output:
    <ExamManager Version=”4.1.0.0″ Year=”2008″>
    <Description Value=”2008 Exam Manager”/>
    </ExamManager>
  2. The code will create this XML output:
    <ExamManager Description=”2008 Exam Manager”>
    <Version>4.1.0.0</Version>
    <Year>2008</Year>
    </ExamManager>
  3. The code will create this XML output:
    <ExamManager Version=”4.1.0.0″ Year=”2008″>
    <Description>2008 Exam Manager</Description>
    </ExamManager>
  4. The code will create this XML output:
    <ExamManager Version=”4.1.0.0″ Year=”2008″/>
    <Description>2008 Exam Manager</Description>

Correct Answer: 3

Tagged . Bookmark the permalink.

Leave a Reply