you can use ajax ,push data to database.
jquery is simple and useful.
$.post('test.ashx', { parm:value },function (back) {
}, "json");
test.ashx code:
context.Response.ContentType = "application/json";
context.Response.Write("{\"p\":\"11\",\"s\":\"22\"}");