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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:43:16+00:00 2026-05-14T21:43:16+00:00

I have the following in my form <td><input id=Notifications_0__IssueCreate name=Notifications[0].IssueCreate type=checkbox value=true /><input name=Notifications[0].IssueCreate

  • 0

I have the following in my form

<td><input id="Notifications_0__IssueCreate" name="Notifications[0].IssueCreate" type="checkbox" value="true" /><input name="Notifications[0].IssueCreate" type="hidden" value="false" /></td>
        <td><input id="Notifications_0__AllChanges" name="Notifications[0].AllChanges" type="checkbox" value="true" /><input name="Notifications[0].AllChanges" type="hidden" value="false" /></td>

In the partial view it`s wrriten as :

<%int count = 0; %>
 <%foreach (var item in Model.List)
   {%>
        <tr>
        <td><%=Html.CheckBox("Notifications[" + (count) + "].IssueCreate", item.IssueCreate)%></td>
        <td><%=Html.CheckBox("Notifications[" + (count++) + "].AllChanges", item.AllChanges)%></td>
       </tr>
   <%}
 %>

I want to submit to the controller upon each and every click on any of the checkbox. i.e, if user checks the checkbox, it sends the name of the checkbox and if selected or not to the controller, using ajax post.

How can I do that?

  • 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-14T21:43:16+00:00Added an answer on May 14, 2026 at 9:43 pm

    Here’s an example function which registers a click event handler for all checkboxes and posts the name and the value of the clicked element to a controller action through AJAX:

    $(function() {
        $('input:checkbox').click(function() {
            var $this = $(this);
            $.post(
                '/home/action', 
                {
                    name: $this.attr('name'),
                    value: $this.val()
                }, 
                function(data) {
                    alert('success');
                }
            );
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following html form: <form method=post action=> <input type=hidden name=userid id=user value=<?php echo
I have the following form: <form class=lift:form.ajax> <div class=lift:StreamInput> <input type=hidden name=user value=USER />
I have the following form: <form class=lift:form.ajax> <div class=lift:StreamInput> <input type=hidden name=path value=test />
Suppose I have the following HTML: <form id=myform> <input type='checkbox' name='foo[]'/> Check 1<br/> <input
I have the following code: echo ' <td> <input type=button name=delete value=X onclick=clearSelection(this.form, '.$type.');this.form.submit();
I have the following form: <form action=download.php method=get> <input type=checkbox name=file1 /> File1 <br/>
I have the following form code: <input data-color=orange id=vote_color_id_2 name=color type=radio value=2 />Orange <input
I have the following form input field: <input type=text value= title=Enter item description name=description>
Suppose I have the following HTML form: <form> ... <input type=submit name=queue value=Queue item>
I have the following form: <form class=lift:form.ajax> <input type=hidden class=lift:StreamIn id=path value=PATH /> <input

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.