send fieldset values by jquery
<p>look at this code : </p>

<pre><code>[WebMethod]
public static string GetFacilities(string id)
{
    int hotelid = System.Convert.ToInt32(Tools.DecryptString(id));

    string ret = "";

    foreach (var item in new FacilityGroupBL().Load())
    {
        if(item.Facilities.Count != 0)
        {
            ret += "&lt;fieldset&gt;";
            if (item.Facilities.Count() != 0)
            {
                foreach (var subitem in item.Facilities)
                {
                    if (subitem.HotelFacilities.Where(obj =&gt; obj.HotelId == hotelid).Count() != 0)
                        ret += "&lt;input type='checkbox' checked='false' /&gt;" + subitem.Name;
                    else
                        ret += "&lt;input type='checkbox' checked='true' /&gt;" + subitem.Name;
                }
            }
            else
            {
                ret += "There is no facility in this fieldset.";
                ret += "&lt;/fieldset&gt;";
            }
        }
    }

    return ret;

}
</code></pre>

<p>by this code i load some checkboxes in a DIV,then user change some checkboxes and press the SAVE button.at this time ,i should send the values of these checkboxes to server to update my data in database.by i dont know how?:( please help</p>

<p>note: my default code for this probem is here but it does not work($("#FacilitiesDIV input[type=checkbox]").serializeArray() is empty)</p>

<pre><code>$.ajax({
    type: "POST",
    url: "HotelsList.aspx/SaveFacilities",
    data: "{ 'id' : '" + $("#HiddenField").val() + "', 'Facilities' : '" + $("#FacilitiesDIV input[type=checkbox]").serializeArray() + "' }",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: function (data) {

    },
    error: function () {
        $('#dialogMessage').dialog('open');
        $('#dialogMessage span').html("Operation Error");
    }
});
</code></pre>
