<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
and cod in Default.aspx is
public static void SaveUser(yu user)
{
string constr = ConfigurationManager.ConnectionStrings["ads"].ConnectionString;
using (SqlConnection con = new SqlConnection(constr))
{
using (SqlCommand cmd = new SqlCommand("INSERT INTO Example1 VALUES(@Password, @email)"))
{
cmd.CommandType = CommandType.Text;
cmd.Parameters.AddWithValue("@Password", user.Password);
cmd.Parameters.AddWithValue("@email", user.email);
cmd.Connection = con;
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
}
}
1-ajaxRequest.open("POST", "Default.aspx/SaveUser", true); this line of code does not call the savemethod.plz help me what is the error of code
2on button click it will server control or html button

Nimit JoshiRank #75 · 24.7K reputationPosted May 5, 2014, 9:26 PM EDT