News:

SQL Table To C# Entity Model ConverterEntity Model (Class Properties) to SQL Table ConverterIf you encounter any trouble visiting our site, please contact us.

MCPD- Exam 70-515: Web Applications Development with Microsoft .NET Framework 4

  1. Require developers to set EnableViewStateMac to true.

  2. Store state in ControlState instead of ViewState.

  3. Serialize the state into an Application state entry called "MyControl"

  4. Require developers to change the session state mode to SQL Server.

Answer: Answer is b

  1. Set viewStateEncryptionMode to Auto in web.config on both servers

  2. Set the machineKey in machine.config to the same value on both servers.

  3. Change the session state mode to SQL Server on both servers and ensure both servers use the same connection string

  4. Override the SavePageStateToPersistenceMedium and LoadPageStateFromPersistenceMedium methods in the page base class to serialize the view state to a local web server file.

Answer: Answer is b

  1. Configure the input control to run on the server. On the submit button, add a server-side OnClick handler that calls CheckCreditCard and rejects the form submission if the input is invalid.

  2. On the input control, add an onChange handler that calls CheckCreditCard and cancels the form submission when the input is invalid

  3. Configure the input control and the submit button to run on the server. Add a submit_OnClick handler that calls CheckCreditCard and rejects the form submission if the input is invalid.

  4. On the form, add an onSubmit handler that calls CheckCreditCard and cancels the form submission if the input is invalid

Answer: Answer is d

  1. <asp:TextBox ID="txt1" runat="server" CausesValidation="true" ValidationGroup="Numeric" />
  2.  <asp:TextBox ID="txt1" runat="server" EnableClientScript="true" ValidationGroup="Numeric" />
  3.  <asp:TextBox ID="txt1" runat="server" />
    <asp:RegularExpressionValidator ID="val1" runat="server" ControlToValidate="txt1" ValidationExpression="[0-9]*" ErrorMessage="Invalid input value" />
  4.  <asp:TextBox ID="txt1" runat="server" />
    <asp:RegularExpressionValidator ID="val1" EnableClientScript="true" ControlToValidate="txt1" ValidationExpression="[0-9]*" ErrorMessage="Invalid input value" />
Answer: Answer is c

  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)" />
Answer: Answer is b, c

  1. Add an HTML input type="file" control. Add an onSubmit handler to the form to check the file size and cancel the form submission if the file size is too large.

  2. Add an HTML input type="file" control. Add an onChange handler to the input control to check the file size and cancel the upload if the file size is too large.

  3. Add an ASP.NET FileUpload control and configure it to run on the server. Add a server-side OnClick handler to the form's Submit button to save the file only if the file size is allowed

  4. Add an ASP.NET FileUpload control and configure it to run on the server. Add a server-side OnDataBinding handler that saves the file only if the file size is allowed.

Answer: Answer is c

  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.

Answer: Answer is d

  1. Write a JavaScript function that uses document.write to write out an asp:MenuItem for each string array element.

  2. In the Page_Render handler, use Response.Write to write out an asp:MenuItem for each string array element.

  3. Set the DataSource attribute of asp:Menu to the name of the array.

  4. In the Page_Load handler, create an instance of asp:MenuItem for each string array element, and add each of these instances to the menu's Items collection

Answer: Answer is d

  1. Call document.write.

  2. Call Response.Write.

  3. Call HttpUtility.UrlEncode

  4. Call HttpUtility.HtmlEncode

Answer: Answer is d

<div class="dropdown-menu">
<div class="menu-title">Menu One</div>
<div class="menu-items" style="display:none;">
<div><a href="#">Item One</a></div>
<div><a href="#">Item Two</a></div>
</div>
</div>
<div class="dropdown-menu">
<div class="menu-title">Menu Two</div>
<div class="menu-items" style="display:none;">
<div><a href="#">Item Three</a></div>
<div><a href="#">Item Four</a></div>
</div>
</div>

You need to write a JavaScript function that will enable the drop-down menus to activate when the user positions the mouse over the menu title. Which code segment should you use?

  1. $(".dropdown-menu").hover(
    function () {
    $(".menu-items").slideDown(100);
    },
    function () {
    $(".menu-items").slideUp(100);
    }
    );
  2. $(".dropdown-menu").hover(
    function () {
    $(".menu-items", this).slideDown(100);
    },
    function () {
    $(".menu-items",this).slideUp(100);
    }
    );
  3. $(".dropdown-menu").hover(
    function () {
    $(this)".slideDown(100);
    },
    function () {
    $(this).slideUp(100);
    }
    );
  4. $(".dropdown-menu").hover(
    function () {
    $("this,".menu-title",).slideDown(100);
    },
    function () {
    $("this.menu-title",).slideUp(100);
    }
    );
Answer: Answer is b

Advertisement

BCS Preparation now even more easy. ReadBD is the place where you can find all kind of resources to be successful in BCS,Bank,Islami Bank exam and interview.

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;