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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:32:37+00:00 2026-05-15T01:32:37+00:00

I got control with strongly typed View, with Ajax.BeginForm(). Now I would like to

  • 0

I got control with strongly typed View, with Ajax.BeginForm(). Now I would like to change submit method from

<input type="submit" id="testClick" value="Submit" />

To some javascript method DoSubmit().
What I tried is :

  • Invoke click on that submit button
  • Invoke submit on form (‘form1’).submit(), document.forms[‘form1’].submit()
  • jQuery forms with (‘form1’).AjaxSubmit();
  • Create jQuery AJAX

    $.ajax({                                                        
        type: "POST",
        url: $("#form1").attr("action"),
        data: $("#form1").serialize(),            
        success: function() {
            alert("epic win!!!1!1!")      
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
            alert("epic fail!")                                        
        }
    });
    

All those method created normal request (not AJAX), or they didn’t work. So anyone know how I can do AJAX submit “Form”, from JavaScript and strongly typed mechanism (public AcrionResult MyFormAction(FormModel model); ) will work?

  • 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-15T01:32:38+00:00Added an answer on May 15, 2026 at 1:32 am

    I’ve had this work fine for me using the forms plugin for jquery. What I found tho, was that I had to handle the click event, do the ajax submit and then return false to ensure that the normal post didn’t occur.

    <script type="text/javascript">
        $('#testClick').click(function(){
            $('#form1').ajaxSubmit();
            return false;
        });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a custom control that gets bound to an object from view model.
I've got a partial control with Ajax.BeginForm containing simple form with one textbox and
I have got an ActiveX Control that gets an image from a fingerprint device
I've got a control that derives from Forms.Control, it handles mouse events and paint
Got a chart control i wanna make from a data table. the table looks
I've got the WebBrowser control to open links in my default browser like this:
I've got some control like CtrlTree on CMyDialog . I want to handle messages
I've currently got custom control that has somehow lost its parent and is now
I've got a WPF Control that exposes one of it's children (from it's ControlTemplate)
I'm using a HtmlEditor control inside a Windows Form. I got the control from

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.