随笔分类 - asp.net
摘要:View CodepublicclassDaysOfTheWeek:System.Collections.IEnumerable{string[]days={"Sun","Mon","Tue","Wed","Thr","Fri","Sat"};publicSystem.Collections.IEnumeratorGetEnumerator(){for(inti=0;i<days.Length;i++){yieldreturndays[i];}}}c
阅读全文
摘要:网上有很多关于jQuery+Json无刷新分页的,各种各样的,大部分都是用的 Pagination 分页插件网上下载的案例,经过自己亲自试用后,抽出最核心的部分,加了详细注释,希望对你有所帮助。使用JQuery paginati抽出最核心的部分,加了详细注释on 分页存储过程处理包括sqlsSrver2000/sqlsSrver2005ashx后台包括2个jsonHelper.cs和sqlHelper.cs处理类 前台Ajax <scripttype="text/javascript">$().ready(function(){InitData(0);$(&qu
阅读全文
摘要:以前也发过关于.net中操作XML的帖子,但不是很详细,现在我将详细介绍一下c#如何操作xml文件,正如学习操作数据库要学习SQL语言一样,在学习操作xml与语言之前,我们要先熟悉一下xml的“sql”语句xpath。由于本系列帖子的目的不在于详细介绍xpath语法所以,我借用了园子里leves的帖子来简单介绍一下xpath语法: XPath 是XML的查询语言,和SQL的角色很类似。以下面XML为例,介绍XPath 的语法。(注:文中示例未经本人测试,可能会有些小错误)<?xml version="1.0" encoding="ISO-8859-1&quo
阅读全文
摘要:1.复制安装文件到站点下的bbs文件夹下2.把安装文件夹下的bin下的所有dll 复制到站点bin下,修改DNT.config其中路径改为/bbs/ 然后剪切至站点根目录下3.将bbs/下的web.config 的<system.webServer> 节 复制到站点下的web.config 中,黏贴在</system.Web>后面4.将bbs/下的web.config 的<httpModules> <add type="Discuz.Forum.HttpModule, Discuz.Forum" name="HttpMod
阅读全文
摘要:.ashx文件用于写web handler,使用.ashx可以让你专注于编程而不用管相关的WEB技术。.ashx对应的类继承于IHttpHandler,所以,.ashx必须包含IsResuable属性,必须实现ProcessRequest方法。IHttpHandler接口,定义ASP.NET为使用自定义HTTP处理程序同步处理HTTP Web请求而实现的协定。IsResuable属性指的是IHttpHandler是否可以被再次使用。ProcessRequest方法则是实现HTTP Web的请求处理。usingSystem;usingSystem.Web;publicclassHandler:I
阅读全文
摘要:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Collections;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControl
阅读全文
摘要:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingSystem.W
阅读全文
摘要:好久没有用asp.net了 最近在做一个小网站,用到图片上传数据库(这里没有实现上传到数据库的方法) 知道怎么上传和截取字符串了后,上传数据库也就很简单了最关键的是几点1 . HttpPostFile的属性FileName2 . 还有SaveAs方法,要注意URL的格式,3 . 还有以前我都是用的字符串截图判断文件的格式,原来可以用System.IO.Path.GetExtension(HPF.F...
阅读全文
摘要:在使用Asp.net的过程中,我们经常需要对时间日期进行转换,达到不同的显示效果。默认格式为:2006-6-6 14:33:34 ,如果要换成成200606,06-2006,2006-6-6或更多的格式该怎么办呢? 这里将要用到:DateTime.ToString的方法(String, IFormatProvider) 示例: 以下是引用片段: usingSystem; usingSy...
阅读全文
浙公网安备 33010602011771号