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 3351616
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:55:49+00:00 2026-05-18T01:55:49+00:00

I am really confused by looking at so many approaches the way JQuery and

  • 0

I am really confused by looking at so many approaches the way JQuery and AJAX are used with MVC and there is no proper documentation I found.

I have a very common scenario in my applications where I have a Form which is a partial view user will submit which will be stored to database if its valid and if not than show user same form again and show an error on the page.

Whats simplest way to do this ? Can I achieve this using simple AJAXForm or I will have to use JSON and JQuery as well ?

 <script type="text/javascript">

        function successContactList() {
               alert("Success.");
      }

        function failureContactList() {
            alert("Error.");
        }

    </script>


    <% using (Ajax.BeginForm("SaveMailingList", "Contacts", new AjaxOptions { OnFailure = "failureContactList", OnComplete = "successContactList", UpdateTargetId = "ContactArea" })) { %>
    <div id="ContactArea">

        <%: Html.EditorFor(Model => Model)  %>
         <input type="submit" value="Save" />
    </div>
    <% } %>



    [HttpPost]
        public ActionResult SaveMailingList(IEnumerable<ContactsInMailingListsViewModel>  contactInMailing) {
            var mailingList = contactInMailing.FirstOrDefault();
            var contact = repository.GetContactById(mailingList.ContactId);
            repository.UpdateMailingList(contactInMailing,contact);
            contactInMailing.FirstOrDefault().EndDate = new DateTime(2077,1,1);
            return PartialView(contactInMailing);

        }
  • 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-18T01:55:50+00:00Added an answer on May 18, 2026 at 1:55 am

    I see two problems with your question.

    1. Have you researched your terms? jQuery is often used for doing AJAX manipulations, and MVC stands for Model-View-Controller, which is one way for your server side code structuring (separation of view and service code). JSON can be used for data exchange and manipulation (a bit like XML, only simpler), and is not required when you’re using forms.
    2. You haven’t told us what is your server side technology. Although forms are basic parts of html specification, you still have to handle them somehow on the server side.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm really confused at the documentation of isSomeFunction , as well as at the
I'm really confused when it comes to queuing jQuery Effects and jQuery UI Effects.
I am really confused about object relationships! I have two classes Person and Address.
I am really confused about this.I have set the background color of the whole
I am really confused what to do...So there is a software named Service desk
I've just started looking at gemfire. I'm really impressed actually. I'm a little confused
I am looking into Backbone JS and getting a little confused. I am used
I'm really confused by all the ambiguity from all the sources I've been looking
I've been looking over the tutorial here: http://msdn.microsoft.com/en-us/library/bb384843.aspx , but I'm really confused on
I've been looking for documentation for cocos2d-x but it seems to be really really

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.