Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 909809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:56:34+00:00 2026-05-15T16:56:34+00:00

I have an MVC app with a Partial View (below). When I add Html.EnableClientValidation(),

  • 0

I have an MVC app with a Partial View (below). When I add Html.EnableClientValidation(), my fields disappear upon exiting them. I don’t expect anyone to figure it out from the code, but if anyone has seen such behavior and can point me in the right direction, I’d appreciate it. In the mean time, I’ll start rebuilding piece by piece and see what I can see and will report back.

Thanks!

<%= Html.ValidationSummary() %>
<% Html.EnableClientValidation(); // IMPORTANT: this line MUST be *before* Html.BeginForm() block %>
<% using (Ajax.BeginForm("Save", "Items", new AjaxOptions { HttpMethod = "post", InsertionMode = InsertionMode.Replace, UpdateTargetId = "ItemPane"})){%>
<%=Html.AntiForgeryToken()%>
<%=Html.Hidden("Item.Id", (ViewData.Model.Item != null) ? ViewData.Model.Item.Id : Guid.Empty)%>
 <!--more hidden items elided-->
   <table> <!--yes, I know it should be divs-->
       <tr>
           <td rowspan="2" width="400px">
            <div class="formarea">
            <fieldset>
                <ol>
                    <li>
                        <label id="Item_Label"><%= (ViewData.Model != null && ViewData.Model.Item != null) ? String.Format("Item Number {0} v. {1}",  ViewData.Model.Item.ItemNumber, ViewData.Model.Item.Iteration) : "New Item" %></label>
                    </li>
                    <li>
                        <label for="Item_Prompt" class="formLabel">Directions:</label>
                        <%=Html.TextAreaFor(t => t.Item.Directions, 3, 50, new { @class = "text2000", @maxlength = "2000" })%>
                        <%= Html.ValidationMessageFor(t => t.Item.Directions, "*")%>
                    </li>
                    <li>
                        <label for="Item_Prompt" class="formLabel">Prompt:</label>
                        <%= Html.TextBoxFor(model => model.Item.Prompt, new { @class = "text200", @maxlength = "200" })%>
                        <%= Html.ValidationMessageFor(model => model.Item.Prompt, "*")%>

                    </li>

I have the following script references:

<%= Html.Script("~/Scripts/MicrosoftAjax.debug.js") %>
<%= Html.Script("~/Scripts/MicrosoftMvcAjax.debug.js") %>
<%= Html.Script("~/Scripts/jquery-1.4.2.min.js") %>
<%= Html.Script("~/Scripts/jquery-ui-1.8.2.custom.min.js") %>
<%= Html.Script("~/Scripts/jquery.form.js") %>
<%= Html.Script("~/Scripts/MicrosoftMvcValidation.js") %>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T16:56:34+00:00Added an answer on May 15, 2026 at 4:56 pm

    Figured it out – it was this css from a previous dalliance with this code:

    /———————————————————-
    ASP.NET MVC FRAMEWORK DEFAULT CSS CLASS NAMES
    ———————————————————-
    /
    .error,.field-validation-error{color:red}

    .input-validation-valid,.field-validation-valid,.validation-summary-valid{display:none}
    .input-validation-error{background-color:#fee;border:1px solid red; outline: none}
    .input-validation-error:focus{outline:none}
    input[type="text"].input-validation-error:focus, select.input-validation-error:focus{outline:none}

    .validation-summary-errors{color:red}
    .validation-summary-errors span{font-weight:700}
    .validation-summary-errors ul{list-style:disc inside}
    .validation-summary-errors ul li{font-weight:normal}
    .validation-summary-errors ul li label, .validation-summary-errors ul li span{display:inline !important; font-weight:normal}

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.