<div id="sender">
<input type="hidden" id="article" value="ID товара">
<input type="text" id="quantuty" value="количество штук">
<input type="button" onclick="SendForm();">
</div>
function SendForm() {
$.post('url/', {article: $("#article").val(), quantuty: $("#quantuty").val(), }, function (data) {
alert('Отправлено');
});
}
<%@ WebHandler Language="C#" Class="Default" Debug="false" %>
using System;
using System.Text;
using System.Security.Cryptography;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Caching;
using System.Xml;
using System.Configuration;
using System.Data.SqlClient;
public class Default : IHttpHandler
{
public void ProcessRequest (HttpContext context)
{
....
using (var conn = new SqlConnection(strSqlConnection))
{
conn.Open();
using (var comm = new SqlCommand("....", conn, null))
{
using (var reader = comm.ExecuteReader())
{
while (reader.Read())
{
context.Response.Write(reader["field"]+"<br>");
}
}
}
}
}
public bool IsReusable
{
get { return true; }
}
}
act:login
to:
_origin:http://vk.com
ip_h:da24d21e86d2625fe7
email:aaa@ya.ru
pass:123456
expire: