随笔分类 -  C#/Asp.Net

iis设置附件大小
摘要:iis6:http://blog.chinaunix.net/uid-20691565-id-3034567.htmliis7:http://www.iisboy.com/iis_article/403.html 阅读全文
posted @ 2013-05-02 13:46 雨季 阅读(358) 评论(0) 推荐(0)
FlashPaper Win2003部署
摘要:文件夹权限那些不说了,主要是要把网站所属的iis的应用程序池设置为本地系统 阅读全文
posted @ 2011-11-30 09:56 雨季 阅读(275) 评论(0) 推荐(0)
WinForm跨进程通信
摘要:publicclassWinMessageHelper{privatestructCOPYDATASTRUCT{publicIntPtrdwData;publicintcbData;[MarshalAs(UnmanagedType.LPStr)]publicstringlpData;}//使用COPYDATA进行跨进程通信publicconstintWM_COPYDATA=0x004A;[DllImport("User32.dll",EntryPoint="SendMessage")]privatestaticexternintSendMessage(i 阅读全文
posted @ 2011-07-18 09:28 雨季 阅读(801) 评论(0) 推荐(0)
三级菜单更新,修改一些错误
摘要:css: <styletype="text/css">*{margin:0;padding:0;border:0;}body{font-family:arial,宋体,serif;font-size:12px;}.navRoot{list-style-type:none;background:#666;height:30px;}.navRootli{position:relative;height:30px;line-height:30px;}.navRootlia:link,.navRootlia:visited{display:block;text-deco 阅读全文
posted @ 2011-07-14 15:49 雨季 阅读(272) 评论(0) 推荐(0)
网页下载IE,FireFox文件名编码
摘要:在Firefox中需要把filename 用双引号包起来,才能得到想要的名字,不然如果含有空格,会丢掉空格后面的部分。而IE会把空格转为_,因此也需要HttpUtility.UrlPathEncode方法处理下名字。如果Firefox中也用HttpUtility.UrlPathEncode处理名字,空格将被替换成"%20".HttpContext.Current.Response.Buffer=true;HttpContext.Current.Response.ClearContent();HttpContext.Current.Response.ClearHeaders( 阅读全文
posted @ 2011-05-27 08:55 雨季 阅读(264) 评论(0) 推荐(0)
类库中引用WebService地址更新
摘要:publicclassWebServiceConfig{publicstaticvoidSetImagePathServiceUrl(){ImageService.Properties.Settings.Default.Properties["ImageService_ImagePathService_FlashImagePath"].DefaultValue=System.Web.Configuration.WebConfigurationManager.AppSettings["FlashImagePathServiceUrl"];ImageServ 阅读全文
posted @ 2011-04-22 18:05 雨季 阅读(404) 评论(0) 推荐(0)
ajax使用json跨域
摘要:转:http://bbs.chinaunix.net/viewthread.php?tid=988681用json和script标签,解决ajax的跨域问题 ajax的XMLHttpRequest因为js的安全问题是不能跨域的 但是<script></script>可以用src="http://otherSite.com/a.js"可以跨域 所以动态写入一个<script></script>就OK了 scr指向一个其它站点的文件,比如:a.php?id=15 让a.phpecho()一个json的字符串 json参考:[url 阅读全文
posted @ 2011-04-08 16:11 雨季 阅读(399) 评论(0) 推荐(0)
抓取网页,生成PDF
摘要:抓取网页源码,只获得html文本,所以只适用于同一站点publicstaticstringGetResponse(stringurl,stringmethod,byte[]postData){try{Uriuri=newUri(url);WebRequestreq=HttpWebRequest.Create(uri);req.ContentType="application/x-www-form-urlencoded";req.Method=method;if(method.ToUpper()=="POST"&&postData!=nul 阅读全文
posted @ 2011-03-22 16:40 雨季 阅读(946) 评论(1) 推荐(1)
抓取网页为图片
摘要:论坛的提问贴,有实用价值:http://topic.csdn.net/u/20071009/10/ee7b6234-2c8b-4eeb-9b13-199f09d22303.htmlusingSystem;usingSystem.Data;usingSystem.Windows.Forms;usingSystem.Drawing;///<summary>///WebSnap:网页抓图对象///</summary>publicclassWebSnap{publicWebSnap(){////TODO:在此处添加构造函数逻辑//}///<summary>///开始 阅读全文
posted @ 2011-03-22 16:24 雨季 阅读(284) 评论(0) 推荐(0)
RSA加密
摘要:<div><asp:ButtonID="btnBuildKey"runat="server"Text="生成密钥"onclick="btnBuildKey_Click"/><br/><br/><asp:TextBoxID="txtData"runat="server"></asp:TextBox><br/><asp:ButtonID="btnEnCrypt"runat 阅读全文
posted @ 2011-03-22 16:19 雨季 阅读(422) 评论(0) 推荐(0)
DESCryptoServiceProvider加密解密
摘要:http://www.dotblogs.com.tw/phoenix7765/archive/2008/08/30/5254.aspx代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->using...System;usingSystem.IO;usingSystem.Security.Cryptography;usingSystem.Text;namespaceClib{///<!--Security類別-->/**////&l 阅读全文
posted @ 2011-02-18 12:06 雨季 阅读(343) 评论(0) 推荐(0)
FCKeditor.Net 2.6.3 配置说明
摘要:FCKeditor是一个功能强大支持所见即所得功能的文本编辑器,可以为用户提供微软office软件一样的在线文档编辑服务。它不需要安装任何形式的客户端,兼容绝大多数主流浏览器,支持ASP.Net、ASP、ColdFusion 、PHP、Java、Active-FoxPro、Lasso、Perl、ython 等编程环境。官方网站 http://www.fckeditor.net/官方文档 http://wiki.fckeditor.net/下载地址 http://www.fckeditor.net/download/default.htmlFCKeditor安装和配置下载FCKeditor2.6 阅读全文
posted @ 2011-01-31 12:21 雨季 阅读(184) 评论(0) 推荐(0)
C#动态编译运行代码串
摘要:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->CSharpCodeProviderCSharp=newCSharpCodeProvider();String[]dll={"System.dll","System.Windows.Forms.dll"};CompilerParameters编译参数=newCompilerParameters(dll);编译参数.GenerateExecutable 阅读全文
posted @ 2011-01-19 10:48 雨季 阅读(385) 评论(0) 推荐(0)
主外键一对一关联查询
摘要:主表:ProductsID ProductName1上衣2短裤3 帽子外键表:ProdutImageID ProductID ProductImage11上衣图片一21 上衣图片二3 2 短裤图片一4 2 短裤图片二SELECT *FROM [SELECT Products.*, (select max(ID) from productImage where ProductID = Products.ID) AS MaxImageIDFROM Products]. AS TA, ProductImageWHERE ProductImage.ID=TA.MaxImageID; 阅读全文
posted @ 2011-01-05 15:46 雨季 阅读(279) 评论(0) 推荐(0)
Flash与C#Winfrom通信
摘要:转:http://www.cnblogs.com/rchen/archive/2006/10/29/csharp_and_flash.html(木野狐 2006-10-29)由于之前一阵公司一个项目提出的需求,自己也想进行这方面的尝试,我对如何使用 Flash 来做 WinForm 程序的界面产生了兴趣,于是学习了一些资料,摘要于此。下图是我做的一个 demo 程序的界面:要在 WinForm 中... 阅读全文
posted @ 2010-09-12 16:17 雨季 阅读(413) 评论(0) 推荐(0)
WPF浏览器程序发布部署注意事项
摘要:转:http://blog.csdn.net/fuyajun001/archive/2010/05/06/5563567.aspx软件环境: Windows 7 旗舰版 Microsoft Visual Studio 2008 Microsoft SQL Server 2008-------------------------------------------------------------... 阅读全文
posted @ 2010-09-06 20:14 雨季 阅读(361) 评论(0) 推荐(0)
使用dsoframer实现Web页面编辑excel功能
摘要:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="WebExcel.aspx.cs"Inherits="WebExcel"%><... 阅读全文
posted @ 2010-08-25 11:51 雨季
Web开发摘录
摘要:1.Yahoo高效的WEB应用建议http://developer.yahoo.com/performance/rules.htmlhttp://www.docin.com/p-1490425.html2.ASP.NET服务端GZIP压缩模块的作用及工作原理http://www.docin.com/p-50414998.html3.ASP.NET AJAX缓存http://dotnet.china... 阅读全文
posted @ 2010-08-18 09:39 雨季 阅读(168) 评论(0) 推荐(0)
网络传输
摘要:转:http://pierce.cnblogs.com/archive/2005/06/21/178343.aspx 对于现在的网络世界,Tcp协议是经常用到的协议,Tcp可以确保网络传输数据的有序性,可靠性,那么你的工作就更加简单了,只需要经文件转换为字节数组,送到网络传输,有接收方把收到的字节组装起来就可以了。 下面说一下将各种数据类型转换为字节数组的方法: BitConverter类可以将数... 阅读全文
posted @ 2010-04-29 11:28 雨季 阅读(385) 评论(0) 推荐(0)
.netRemoting 简单示例
摘要:.netRemoting中客户端与服务器端对象通信,只需要服务器端注册对象,客户端获得对象代理即可使用.下面示例是服务器端主动发消息通知客户端,相比略微复杂些,1.服务器端首先需要生成服务器端对象,并可获得该对象的引用.2.由于服务器端远程对象不能订阅客户端事件,所以需要一个"中间"对象做为桥梁来实现客户端订阅服务器端事件.这个"中间"对象和本来的远程对象格式写法一致.3.委托和事件的序列化、反序... 阅读全文
posted @ 2010-01-23 16:08 雨季 阅读(260) 评论(0) 推荐(0)