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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:32:06+00:00 2026-06-08T02:32:06+00:00

im trying to submit a form by pressing a button that eventually will refresh

  • 0

im trying to submit a form by pressing a button that eventually will refresh the table

this is the form :

@{
AjaxOptions ajaxOpts = new AjaxOptions
{
    Confirm = "start ???",
    UpdateTargetId = "MainTable",
    InsertionMode = InsertionMode.Replace,
    Url = Url.Action("Refresh","MainScreen"),
    LoadingElementId = "loading",
    LoadingElementDuration = 2000,



};}
@using (Ajax.BeginForm(ajaxOpts)){

<div id="loading" style="display: none; color: Red; font-weight: bold">
    <p>
        Loading Data...</p>
</div>

<div id="header">

    <input type="button" value="Submit Form" />

</div>
<table id="MainTable">
    <tr>
        <th>
            ServiceId
        </th>
        <th>
            ServiceInstanceId
        </th>
        <th>
            MessageRole
        </th>
        <th>
            Datetime
        </th>
        <th>
            Message
        </th>
        <th>
            Status
        </th>
        <th>
            ESBErrorCode
        </th>
        <th>
            ESBTecnicalErrorCode
        </th>
        <th>
            ErrorDescription
        </th>
        <th>
            PortName
        </th>
        <th>
            MachineName
        </th>
        <th>
            ConsumerId
        </th>
        <th>
            ExternalId
        </th>
        <th>
            ConsumerMachineName
        </th>
        <th>
            ServiceBehavior
        </th>
        <th>
            RouterConsumerId
        </th>
        <th>
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.ServiceId)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ServiceInstanceId)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.MessageRole)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Datetime)
            </td>
            <td>
                \
                @Html.DisplayFor(modelItem => item.Message.Context)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Status)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ESBErrorCode)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ESBTecnicalErrorCode)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ErrorDescription)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.PortName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.MachineName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ConsumerId)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ExternalId)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ConsumerMachineName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ServiceBehavior)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.RouterConsumerId)
            </td>
        </tr>
    }
</table>
}

this is the Controler :

public ViewResult Refresh()
{

        var tracks = db.Tracks.Include(t => t.Message);
        return View(tracks.ToList());
    } 

for some reason when i submit the button nothing happen

i already added

<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>

thanks
miki

  • 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-08T02:32:08+00:00Added an answer on June 8, 2026 at 2:32 am

    The unobtrusive js helper listens on the submit event with

    $("form[data-ajax=true]").live("submit"...
    

    but your “submit” button is “just a button” not a submit button:

    <input type="button" value="Submit Form" />
    

    Change it to type="submit"and it should work:

    <input type="submit" value="Submit Form" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to submit a form without a submit button. This form takes values
I am trying to submit a form without page refresh or a submit button.
I'm trying to submit a form to a php page that contains a WP_QUERY,
I'm trying trying to submit a form to a new window and redirect the
I'm trying to submit a form witch sends an email: JS var that =
I am trying to submit a form that only has a radiobutton group with
I’m trying to submit a form by clicking links, without using a submit button.
I'm trying to submit a simple form that has an array of fields: <form>
I'm trying to submit a form using javascript. This is the code I've used
i have a form element- text input and a submit button- Im trying to

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.