文件在哪里?

时间:2014-06-04 21:25:59

标签: jquery ajax

Default.aspx / OtherNames文件位于何处?我试图找到该目录的代码,但似乎无法弄清楚它是否在Default.aspx中,或者它是否与Default.aspx在同一文件夹中

 $.ajax({
                type: "POST",
                url: "Default.aspx/GetSingleTrackData",
                data: "{}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",

文件背后的代码

public partial class Admin_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {


        if (Request.ServerVariables["REQUEST_METHOD"] == "POST")
        {

            string email = Request.Form["login-email"];
            string password = Request.Form["login-password"];

            using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["BradConnectionString"].ConnectionString))
            {
                //command
                using (SqlCommand cmd = new SqlCommand())
                {
                    try
                    {

                        cmd.CommandText = "select * from admin where email='" + email + "' and pwd='" + password + "'";

                        conn.Open();
                        cmd.Connection = conn;
                        SqlDataReader reader = cmd.ExecuteReader();

                        while(reader.Read())

                        {
                            Response.Redirect("dashboard.aspx?name=" + reader["fname"].ToString());

                        }


                    }
                    catch { }
                }
            }
        }



    }
}

0 个答案:

没有答案