Web Developer Framework 4.0 Sample Questions – 29

Question: You are developing a Windows Communication Foundation (WCF) service that reads messages from a public non-transactional MSMQ queue. You need to configure the service to read messages from the failed-delivery queue. Which URI should you specify in the endpoint configuration settings of the service

  1. net.msmq://localhost/msmq$;FailedMessages
  2. net.msmq://localhost/msmq$;DeadLetter
  3. net.msmq://localhost/system$;DeadXact
  4. net.msmq://localhost/system$;DeadLetter

Correct Answer: 4


Question: You are implementing an ASP.NET Web page.You need to add a text box that allows only values between 1 and 10, inclusive, to be submitted.
Which two code segments should you use (Each correct answer presents part of the solution. Choose two.)

  1. <script type="text/javascript">
    function validate_value(obj, args) {
    return
    (args.Value >= 1 && args.Value <= 10);
    }
    </script>
  2. <script type="text/javascript">
    function validate_value(obj, args) {
    args.IsValid =
    (args.Value >= 1 && args.Value <= 10);
    }
    </script>
  3. <asp:TextBox ID="txt1" runat="server" />
    <asp:CustomValidator ID="val1" runat="server"
    ControlToValidate="txt1"
    ClientValidationFunction="validate_value"
    ErrorMessage="Value invalid" />
  4. <asp:TextBox ID="txt1" runat="server" onChange="validate_value(this, args)" />

Correct Answer: 2 & 3


Question: A Windows Communication Foundation (WCF) service is responsible for transmitting XML documents between systems. The service has the following requirements: It must minimize the transmission size by attaching the XML document as is without using escape characters or base64 encoding. It must interoperate with systems that use SOAP but are not built on the .NET platform.
You need to configure the service to support these requirements. Which message encoding should you use

  1. Binary message encoding
  2. MTOM (Message Transmission Optimization Mechanism) message encoding
  3. Text message encoding with message version set to none
  4. Text message encoding with message version set to SOAP 1.2

Correct Answer: 2


Question: You are dynamically adding controls to an ASP.NET page in the Page_Load event handler. The page will have text boxes that correspond to the columns in a database table. Each text box will be preceded by a label that displays the name of the corresponding column. What should you do

  1. For each column, output the following HTML, where COL is replaced by the name of the column.
    <label>COL</label>
    <input name="COL" type="text" id="COL" />
  2. For each column, output the following HTML, where COL is replaced by the name of the column.
    <label AssociatedControlID="COL">COL</label>
    <input name="COL" type="text" id="COL" />
  3. For each column, create an asp:Label control and a corresponding asp:TextBox that have the same ID.
  4. For each column, create an asp:Label control and set the AssociatedControlID to the ID of the corresponding asp:Textbox control.

Correct Answer: 4


Question: You are designing the user interface for an ASP.NET Web application. The Web application allows several departments to personalize the style of their sections of the Web application. All departmental section styles derive from the core styles of the Web application and can only append to the Web application’s core styles. The departmental master pages inherit from the Web application’s master page. You need to ensure that core CSS styles appear in all pages of the Web application. Which approach should you recommend

  1. Add a master.css file containing the CSS styles to the Web application.
  2. Add a ContentPlaceHolder containing the CSS styles to the Web application’s master page.
  3. Link from the Web application’s master page to a .css file containing the CSS styles.
  4. Link from the Web application’s master page to a css.ascx file containing the CSS styles.

Correct Answer: 3

Tagged . Bookmark the permalink.

Leave a Reply