zoukankan      html  css  js  c++  java
  • Ajax处理函数模板

    Ajax处理函数模板

     public void IsAjaxFunction()
            {
                string state = "0";
                string isAjax = this.GetRequest("isAjax").ToLower();

                if (isAjax == "true")
                {
                    string action = this.GetRequest("action").ToString();
                    string values = this.GetRequest("values").ToString();
                    switch (action)
                    {
                        case "repost":
                            state = this.Db.GetState("update Product set FlushTime=getdate() where P_ID=@P_ID", new System.Data.SqlClient.SqlParameter("@P_ID", values)) ? ("1") : ("0");
                            break;
                        case "shanchu":
                            state = this.Db.GetState("delete from  Product where P_ID=@P_ID", new System.Data.SqlClient.SqlParameter("@P_ID", values)) ? ("1") : ("0");
                            break;
                        default:
                            break;
                    }
                    Response.Clear();
                    Response.Write(state);
                    Response.End();
                }
            }

  • 相关阅读:
    string截断
    winform截屏
    android自定义tabhost,tabcontent用intent获得
    Eclipse引入jar包的三种方式
    jquery dataTable的学习
    jquery datatable 参数
    Sql Server中三种字符串合并方法的性能比较
    sql表设计
    开发守则
    App Store2016年最新审核规则
  • 原文地址:https://www.cnblogs.com/bestsaler/p/1835604.html
Copyright © 2011-2022 走看看