2017年11月23日

aspnet 后台调用前台js函数

摘要: this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "testalert", " <script type=text/javascript >testAlert();</script>"); 阅读全文

posted @ 2017-11-23 15:40 A欣 阅读(174) 评论(0) 推荐(0) 编辑

2017年10月16日

sql语法

摘要: 1、说明:创建数据库CREATE DATABASE database-name 2、说明:删除数据库DROP DATABASE dbname 3、说明:备份SQL server 创建 备份数据的 deviceUSE masterEXEC sp_addumpdevice 'disk', 'testBa 阅读全文

posted @ 2017-10-16 21:34 A欣 阅读(112) 评论(0) 推荐(0) 编辑

web网页调用本地cs客户端程序exe

摘要: 1.reg注册表文件注册WST Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\WST]"URL Protocol"="C:\\WSTStart.exe"@="WSTProtocol"[HKEY_CLASSES_ROOT\WST\Defa 阅读全文

posted @ 2017-10-16 21:07 A欣 阅读(3718) 评论(0) 推荐(0) 编辑

2017年9月30日

json转datatable

摘要: public static DataTable JsonToDataTable(string strJson) { DataTable tb = null; //获取数据 Regex rg = new Regex(@"(?<={)[^}]+(?=})"); MatchCollection mc = 阅读全文

posted @ 2017-09-30 16:49 A欣 阅读(240) 评论(0) 推荐(0) 编辑

layui之ajax巨坑

摘要: 在使用layui做前端框架的时候,在请求ajax时,回调函数不执行问题,找了各种原因,各种的更改ajax参数类型和webapi返回类型 各种不行,最后发现layui默认是form提交,想要让他执行ajax回调就只是一句话 return false 看代码 layui.use(['form', 'la 阅读全文

posted @ 2017-09-30 16:45 A欣 阅读(50167) 评论(0) 推荐(2) 编辑

2017年9月25日

webapi ajax 跨域

摘要: 一.使用Nuget搜索“microsoft.aspnet.webapi.cors二.jQuery.support.cors = true;三.指定域名 [EnableCors(origins: "http://localhost:8081/", headers: "*", methods: "GET 阅读全文

posted @ 2017-09-25 17:07 A欣 阅读(185) 评论(0) 推荐(0) 编辑

asp.net登录票据验证

摘要: * 1.设置<authentication mode="Forms"/> * 2.票据数据保存在cookie中,Logout就一直处于登录状态。 using System;using System.Collections.Generic;using System.Text;using System. 阅读全文

posted @ 2017-09-25 11:08 A欣 阅读(415) 评论(0) 推荐(0) 编辑

2017年8月24日

js两数字相除 保留两位小数

摘要: $('#aa').value=(a/b).toFixed(2); 阅读全文

posted @ 2017-08-24 09:08 A欣 阅读(2037) 评论(0) 推荐(0) 编辑

2017年8月22日

SQL统计每天、每月、每年的数据

摘要: 1、每年select year(ordertime) 年,sum(Total) 销售合计from 订单表group by year(ordertime)2、每月select year(ordertime) 年,month(ordertime) 月,sum(Total) 销售合计from 订单表gro 阅读全文

posted @ 2017-08-22 17:16 A欣 阅读(588) 评论(0) 推荐(0) 编辑

js获取url中的参数

摘要: //获取url中的参数 function getUrlParam(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象 var r = window.location.search.s 阅读全文

posted @ 2017-08-22 17:08 A欣 阅读(325) 评论(0) 推荐(0) 编辑

导航