摘要: 所需工具与项目结构同(一)。service.asmx中代码如下:using System;using System.Collections.Generic;using System.Web;using System.Web.Services;using Newtonsoft.Json;using System.Data.SqlClient;using System.Data;using System.Web.Script.Serialization;namespace WebService2{ /// /// Service1 的摘要说明 /// [WebServi... 阅读全文
posted @ 2013-10-31 17:40 时光未曾老去. 阅读(332) 评论(0) 推荐(0) 编辑
摘要: 注:需要的js文件与组件(jquery-1.4.2.min.js和Newtonsoft.Json)同域:要调用的webservice与ajax请求页面在同一个网站下(本文中都是本地测试)。数据库(表名 CarUsing cuid 主键自增列 int , carUsing varchar(100) 车辆用途)一、创建webService。在框架4.0中找不到Asp.Net Web服务应用程序。将框架更改为4.0以下即可找到。也创建一个网站在网站中添加webService。建立的web服务应用程序的结构如下。CarUsing.cs中代码如下:using System;using System.Co 阅读全文
posted @ 2013-10-31 17:36 时光未曾老去. 阅读(403) 评论(0) 推荐(0) 编辑
摘要: 分页需要知道哪些数据?a 页大小:每页显示多少条数据PageSizeb 当前页:当前显示第几页数据CurrentPageIndexc 总页数: 按照页大小分配,表中的所有数据总共分几页显示。1 使用not in、子查询 ROW_NUMBER()a 使用not in、子查询select top PageSize * from 表 where 条件 and id not in(select top PageSize * (CurrentPageIndex -1) id from 表 where 条件 order by 排列顺序)order by 排列顺序b --使用ROW_NUMBER()即:加了 阅读全文
posted @ 2013-06-17 13:31 时光未曾老去. 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 处理浏览器后退问题。安全退出。Session.Abandon();Session.Clear();//清空session //禁止浏览器后退。方法:在安全退出后先情况session再跳回一个指定页面,再前一个页面的load事件里处理代码、。判断是否为空。为空的话便再返回登录页面。处理兼容性问题。 解... 阅读全文
posted @ 2013-06-17 13:29 时光未曾老去. 阅读(143) 评论(0) 推荐(0) 编辑