Click here to Skip to main content
15,867,750 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I would like to know what would be the best way for me to achieve my goal

I have a table called EscManager that holds data userid,emailadrress and a tier

I have another table called users

the tables are linked by usersid

On the GUI the i have to show a list of all the users and add a check box.

If the user check box gets checked then the user needs to be added into the EscManager table and if the users check box is checked and gets unchecked the user needs to be removed from the EscManager table

I was thinking of adding a postback to the checkbox to and run an insert statement but not sure if this is the best way to do it

I was also thinking of using a save button, but would that mean that the EscManager would have to have all records deleted and all records re-inserted?

Please could you help

Regards
Posted

1 solution

No Need to post back ,you may use Jquery or javas script

<input type="checkbox" id="checkbox1d" />

C#
$(document).ready(function() {
    //set initial state.


    $('#checkbox1d').change(function() {
        if($(this).is(":checked")) {
            //you may fire web services to save data into database
        }

    });
});




//you may fire web services to save data into database[^]


http://aspsnippets.com/Articles/Save-Form-Data-to-Database-with-jQuery-AJAX-in-ASPNet.aspx[^]
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900