摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Web;using System.Data.OleDb;using System.Data.SqlClient;using System.Xml;namespace ClassLibrary1{ public class complete:IHttpModule { public void Dispose() { } public void Init(HttpApplication context) { c 阅读全文
posted @ 2012-01-06 17:39 甜菜波波 阅读(239) 评论(0) 推荐(0)
摘要: 1.今天在研究url重写问题的时候,发现在vs里运行.html的文件可以,但在iis上不行,下载了好多urlrewriter,又更改iis 站点的isapi 使其指向.html,但还是没有解决问题,看了一篇文章(文章如下),才明白,只需要:右键点击站点--》属性--》虚拟目录--》配置--映射--》选中.aspx --》复制“C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll”--》取消--》点击”添加“--》将“C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_i 阅读全文
posted @ 2011-12-28 16:58 甜菜波波 阅读(468) 评论(0) 推荐(0)
摘要: 正则表达式匹配html元素的时候,正则表达式字符串,和源字符串都不要Server.HtmlEncode() 编码了,直接匹配1.html 内容如下:<td class="coln_2"> <div class="divTrueName"> <!--{start}--> <a id="tbl_tr_name_qt_1" href="http://shanghai.anjuke.com/shop/view/316462" class="aTrueName" 阅读全文
posted @ 2011-11-24 17:34 甜菜波波 阅读(307) 评论(0) 推荐(0)
摘要: 在实际开发中如新闻系统就需要利用js来调用某分类的新闻等.非Codebehind版Showjs.aspx----------------------------<%Response.Write ("document.write('output')")%>Showjs.html---------------------------<script language="JavaScript" Src="Showjs.aspx"></script>这样就可以正常查看showjs.html输出 阅读全文
posted @ 2011-11-18 09:43 甜菜波波 阅读(596) 评论(0) 推荐(0)
摘要: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->substr方法返回一个从指定位置开始的指定长度的子字符串。stringvar.substr(start[,length])参数stringvar必选项。要提取子字符串的字符串文字或String对象。start必选项。所需的子字符串的起始位置。字符串中的第一个字符的索引为0。length可选项。在返回的子字符串中应包括的字符个数。说明如果length为0或负数,将返回一个空字符串。如果没有指定该 阅读全文
posted @ 2011-11-17 17:10 甜菜波波 阅读(198) 评论(0) 推荐(0)
摘要: 在读取二进制图片时,有时会显示 xml页面无法显示··· 这可能是因为 Response.ContentType = "Image/Jpeg"; 写的有问题 阅读全文
posted @ 2011-11-14 18:19 甜菜波波 阅读(162) 评论(0) 推荐(0)
摘要: 上传核心代码:try { string ImgPath = FileUpload1.PostedFile.FileName; string ImgName = ImgPath.Substring(ImgPath.LastIndexOf("\\") + 1); string ImgExtend = ImgPath.Substring(ImgPath.LastIndexOf(".") + 1); if (!(ImgExtend == "bmp" || ImgExtend == "jpg" || ImgExtend == 阅读全文
posted @ 2011-11-14 09:47 甜菜波波 阅读(218) 评论(0) 推荐(0)
摘要: 上传图片,生成缩略图,加文字水印,图片水印方法实现2009-07-28 10:40:06|分类: asp.net |标签: |字号大中小订阅 /// <summary> /// 生成缩略图 /// </summary> /// <param name="originalImagePath">源图路径(物理路径)</param> /// <param name="thumbnailPath">缩略图路径(物理路径)</param> /// <param name="wi 阅读全文
posted @ 2011-11-14 09:45 甜菜波波 阅读(153) 评论(0) 推荐(0)
摘要: In Visual Studio .NET 2003, it was pretty straight forward to create Web Control Library, Mobile Web Applications etc., since each of them had templates that were present in "Add - New - Project" quite prominently.在Visual Studio 。 NET 2003年,这是一个口直着创建Web控件库,移动互联网应用等,因为每个人的模板,出现在“添加-新-项目”相当突 阅读全文
posted @ 2011-11-02 10:00 甜菜波波 阅读(221) 评论(0) 推荐(0)
摘要: 1.新建一个项目2.邮件点击解决方案下的网站目录,选择“添加web引用”,输入web服务的网址,必须是以 asmx结尾的,且不带参数,(这里以http://webservice.webxml.com.cn/WebServices/WeatherWS.asmx为例)然后前往---3.在web引用名 中的就是命名空间,有的是自动填好的,有的需要自己填写,然后在 程序里添加引用就行了··4。在程序里 添加 using cn.com.webxml.webservice;这样就可以了 实例化然后调用方法了,对了,还要看web服务商的“接口帮助文档”来查看有哪些方法可以调用接下来if 阅读全文
posted @ 2011-09-14 10:39 甜菜波波 阅读(505) 评论(0) 推荐(0)