04 2009 档案
摘要:// 输出硬盘文件,提供下载// 输入参数 _Request: Page.Request对象, _Response: Page.Response对象, _fileName: 下载文件名, _fullPath: 带文件名下载路径, _speed 每秒允许下载的字节数// 返回是否成功public static bool ResponseFile(HttpRequest _Request,HttpRe...
阅读全文
摘要:页面代码:<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="RepeaterPagingSortingDelete.aspx.cs"Inherits="RepeaterPagingSortingDelete"%> <!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""...
阅读全文
摘要:分页加排序的存储过程: --得到总记录数 if exists(select 1 from sys.objects where name = 'GetProductsCount' and type = 'P') drop proc GetProductsCount go CREATE PROCEDURE GetProductsCount as select...
阅读全文
摘要:Repeater自定义分页,使用的存储过程如下 --取得总记录数 if exists(select 1 from sys.objects where name = 'GetProductsCount' and type = 'P') drop proc GetProductsCount go CREATE PROCEDURE GetProductsCoun...
阅读全文
摘要:ASP.net 获得客户端的IP,最常见的是使用下述代码: string user_IP = System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]; 对于了解代理服务器情况的人,我们会知道,如果用户使用了代理服务器,上述代码获得的是代理服务器的IP地址;如果用户使用了多个代理服务器,则是到达服务器的最后一个代理服...
阅读全文
摘要:在你的Web.config里把: 改成:
阅读全文
摘要:declare @sql nvarchar(1000),@idname varchar(100) set @sql=N'select @aa=idname from table where id='+@id exec sp_executesql @sql,N'@aa varchar(100) output',@idna...
阅读全文
摘要:纯htm页面必须采用AJAX了,ASP页面:var manager='',ASPX页面:var manager='',例如:用session来判断客户是否登录,ASP页面:方法(1)manager.asp show.asp方法(2)show.asp
阅读全文
摘要:AJAX 的要点是 XMLHttpRequest 对象。 不同的浏览器创建 XMLHttpRequest 对象的方法是有差异的。 IE 浏览器使用 ActiveXObject,而其他的浏览器使用名为 XMLHttpRequest 的 JavaScript 内建对象。 如需针对不同的浏览器来创建此对象,我们要使用一条 "try and catch" 语句。您可以在我们的 JavaScript 教程中...
阅读全文
摘要:1、Math.Round(0.333333,2);//按照四舍五入的国际标准2、double dbdata=0.335333;string str1=String.Format("{0:F}",dbdata);//默认为保留两位3、float i=0.333333;int j=(int)(i * 100);i = j/100;4、decimal.Round(decimal.Parse("0....
阅读全文
摘要:using System;using System.ComponentModel;using System.Data;using System.Windows.Forms;namespace WindowsApplication1...{ public partial class Form1 : Form ...{ public Form1() ...
阅读全文