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

  • SEARCH
  • Home
  • 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 8344513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:23:54+00:00 2026-06-09T06:23:54+00:00

I have been struggling with this for days. I have a form that’s a

  • 0

I have been struggling with this for days. I have a form that’s a partial view loaded via Ajax but it’s not submitting via Ajax even though it uses Ajax.BeginForm().

Controller:

<HttpGet()> _
    Public Function PersonalDetailsEdit(PersonalInfo As DetailsViewModel.PersonalDetails) As PartialViewResult
        Return PartialView(PersonalInfo)
    End Function

    <HttpPost()> _
    <AjaxOnly()> _
    Public Function PersonalDetailsEdit(formcollection As FormCollection, model As DetailsViewModel.PersonalDetails) As PartialViewResult
        Return PartialView("PersonalDetails", model)
    End Function

View:

@ModelType ASK.Everest.ViewModels.DetailsViewModel.PersonalDetails

@Using Ajax.BeginForm("PersonalDetailsUpdate", "Details", New AjaxOptions() With {
                     .InsertionMode=InsertionMode.Replace,
                     .UpdateTargetId = "PersonalDetailsSection",
                     .OnFailure = "alert('fail');"}, New With {.id="PersonalDetailsForm"})
    @Html.ValidationSummary(True)

@<fieldset id="PersonalDetailsUpdate">
    <table class="table table-striped ">
        <tr>
            <th class="display-label">
                <input type="hidden" value="@Html.NameFor(Function(model) model.Title)" />
                @Html.DisplayNameFor(Function(model) model.Title)
            </th>
            <th class="display-label">
                <input type="hidden" value="@Html.NameFor(Function(model) model.FirstName)" />
                @Html.DisplayNameFor(Function(model) model.FirstName)
            </th>
            <th class="display-label">
                <input type="hidden" value="Surname" />
                @Html.DisplayNameFor(Function(model) model.Surname)
            </th>
        </tr>
        <tr>
            <td class="display-field">
                @Html.DisplayFor(Function(model) model.Title)
            </td>
            <td class="display-field">
                @Html.DisplayFor(Function(model) model.FirstName)
            </td>
            <td class="display-field">
                @Html.DisplayFor(Function(model) model.Surname)
            </td>
        </tr>
        <tr>
            <th>
            </th>
            <th class="display-label">
                @Html.DisplayNameFor(Function(model) model.Gender)
            </th>
            <th class="display-label">
                <input type="hidden" value="@Html.NameFor(Function(model) model.DOB)" />
                @Html.DisplayNameFor(Function(model) model.DOB)
            </th>
        </tr>
        <tr>
            <td>
            </td>
            <td class="display-field">
                @Html.DisplayFor(Function(model) model.Gender)
            </td>
            <td class="display-field">
                @Html.DisplayFor(Function(model) model.DOB)
            </td>
        </tr>
        <tr>
            <th>
            </th>
            <th class="display-label" colspan="2">
                @Html.DisplayNameFor(Function(model) model.IDNumber)
            </th>
        </tr>
        <tr>
            <td>
            </td>
            <td class="display-field" colspan="2">
                @Html.DisplayFor(Function(model) model.IDNumber)
            </td>
        </tr>
        <tr>
            <th>
            </th>
            <th class="display-label">
                @Html.DisplayNameFor(Function(model) model.MaritalStatus)
            </th>
            <th class="display-label">
                @Html.DisplayNameFor(Function(model) model.Nationality)
            </th>
        </tr>
        <tr>
            <td>
            </td>
            <td class="display-field">
                @Html.DisplayFor(Function(model) model.MaritalStatus)
            </td>
            <td class="display-field">
                @Html.DisplayFor(Function(model) model.Nationality)
            </td>
        </tr>
    </table>
    @*@Html.ActionLink("Back to List", "Index")*@
    <p class="pull-right">

        <input type="submit" value="Save" />
    </p>
</fieldset>
End Using

My bundles:

bundles.Add(New ScriptBundle("~/bundles/ask").Include(
                "~/Scripts/jquery-1.7.*",
                "~/Scripts/jquery-ui*",
                "~/Scripts/jquery.validate*",
                "~/Scripts/jquery.unobtrusive*",
                "~/Content/bootstrap/js/bootstrap.js"))

_Layout.vbtml:

<!DOCTYPE html>
<html lang="eng">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>@ViewData("Title")</title>
    @Styles.Render("~/Content/css")
    @RenderSection("styles", required:=False)

    @Scripts.Render("~/bundles/modernizr")
    @Scripts.Render("~/bundles/ask")

    @RenderSection("scripts", required:=False)
</head>
<body>
    @RenderBody()
</body>
</html>

Gave up after much frustration and decided to go JQuery + Knockout route with MVVM on the client side like this:

<script type="text/javascript">
var data = @Html.Raw(Json.Encode(Model)) ;
var PersonalDetailsVM = ko.mapping.fromJS(data);
ko.applyBindings(PersonalDetailsVM, $('section#PersonalDetails')[0]);
</script>

Now I’m just struggling with JSON/MVC Date conversions – I thought MVC4 was supposed to use JSON.NET by default? I’ll just post another question if it’s a lot of hassle.

  • 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-06-09T06:23:55+00:00Added an answer on June 9, 2026 at 6:23 am

    Save yourself the headache and use jQuery. Microsoft basically “jumped ship” on their ASP.NET AJAX and is now supporting jQuery.

    http://weblogs.asp.net/toddanglin/archive/2010/04/19/microsoft-ajax-client-library-is-dead-long-live-jquery.aspx

    http://stephenwalther.com/archive/2010/03/16/microsoft-jquery-and-templating.aspx

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

Sidebar

Related Questions

I have been struggling with this for days. This works, but does not pass
sorry to post this but have been struggling now for 8 days and really
So I've been struggling with this for a couple days now. I have a
I have been struggling with this for three days, I want to do a
We have been struggling with this for a few days and have done lots
I have been struggling with that for 4 days now. I have a very
I have been struggling with getting this to work for a number of days
I have a problem that I have been struggling with for a few days
I have been struggling with this for several days now and I ran out
I have been struggling with this issue for the past couple days: I have

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.