随笔分类 - asp.net
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Text; 4 using System.Xml.Serialization; 5 using System.IO; 6 using System.Xml; 7 ...
阅读全文
摘要:Aspose.Cells 导入导出EXCEL修改样式Workbook workbook = new Workbook(); //工作簿Worksheet sheet = workbook.Worksheets[0]; //工作表Cells cells = sheet.Cells;//单元格//样式2Aspose.Cells.Style style2 = workbook.Styles[workbook.Styles.Add()];//新增样式style2.HorizontalAlignment = TextAlignmentType.Center;//文字居中style2.VerticalAl
阅读全文
摘要:1 /// 2 /// 总记录数 3 /// 每页记录数 4 /// 当前页数 5 /// Url参数 6 private string pagination(int total, int per, int page, string query_string) 7 { 8 int allpage = 0; 9 int next = 0;10 int pre = 0;11 int startcount = 0;12 int endcount = 0;13 ...
阅读全文
摘要:首先下载HtmlAgilityPack 官网:http://htmlagilitypack.codeplex.com/根据自己.net的版本引入dll实现抓取博客园首页文章列表中的标题和地址,代码如下: 1 WebClient wc = new WebClient(); 2 wc.Encoding = System.Text.Encoding.UTF8; 3 string mainData = wc.DownloadString("http://www.cnblogs.com/"); 4 HtmlD...
阅读全文
摘要:原文地址:http://www.cnblogs.com/MeteorSeed/archive/2012/12/24/2703716.html目录一Lucene.Net概述二 分词三 索引四 搜索五 实践中的问题一Lucene.Net概述 Lucene.Net是一个C#开发的开源全文索引库,其源码包括“核心”与“外围”两部分。外围部分实现辅助功能,而核心部分包括:Lucene.Net.Index 提供索引管理,词组排序。Lucene.Net.Search 提供查询相关功能。Lucene.Net.Store 支持数据存储管理,主要包括I/O操作。Lucene.Net.Util 公共类。Lucen.
阅读全文
摘要:1. 基本应用 using System;using System.Collections.Generic;using System.Text;using Lucene.Net;using Lucene.Net.Analysis;using Lucene.Net.Analysis.Standard;using Lucene.Net.Documents;using Lucene.Net.Index;using Lucene.Net.QueryParsers;using Lucene.Net.Search;using Lucene.Net.Store;using Lucene.Net.Util;
阅读全文
摘要:1 public void ProcessRequest (HttpContext context) { 2 3 string elxStr = "<table><tbody><tr><td>1</td><td>11</td></tr><tr><td>2</td><td>22</td></tr></tbody></table>"; 4 context.Response.Clear();
阅读全文
摘要:本文转自:http://www.cnblogs.com/peida/archive/2008/11/27/1341920.html在Lucene.net实现自定义排序,需要实现两个Lucene.Net.Search的两个接口: 1 public interface SortComparatorSource 2 { 3 ScoreDocComparator NewComparator(IndexReader reader , System.String fieldname) ; 4 } 5 6 public interface ScoreDocComparator 7 { 8 in...
阅读全文
摘要:在webconfig文件中的<system.web>节点下加入以下配置: <webServices> <protocols> <add name="HttpSoap"/> <add name="HttpPost"/> <add name="HttpGet"/> <add name="Documentation"/> </protocols> </webServices>
阅读全文
摘要:ffmpeg.exe -i F:\闪客之家\闪客之歌.mp3 -ab 56 -ar 22050 -b 500 -r 15 -s 320x240 f:\11.flvffmpeg -i F:\01.wmv -ab 56 -ar 22050 -b 500 -r 15 -s 320x240 f:\test.flv使用-ss参数 作用(time_off set the start time offset),可以从指定时间点开始转换任务。如:转换文件格式的同时抓缩微图:ffmpeg -i "test.avi" -y -f image2 -ss 8 -t 0.001 -s 350x240
阅读全文
摘要:由于最近公司服务器上需要将iis的应用程序池全部都升级到4.0的框架,当然选择4.0就肯定使用集成模式部署升级过程中出现了比较多的问题,前面文章也提到过几个。这次就主要介绍下httpHandler 和 httpModule 在集成和经典模式下的区别。很多文件上传等都是需要使用到httpModule去实现。我今天就出现了NeatUpload在iis7.5下出现未将对象引用到设计实例的错误。所以用httpModule作为测试案例。1、新建测试网站WebApplication,加入MyHttpModule类实现IHttpModule接口,主要目的是测试程序是否经过了HttpModule,经过的在页面
阅读全文
摘要:1、新建一个类继承IHttpModule 1 public class StopAppDomainRestartOnFolderDeleteModule : IHttpModule 2 { 3 private static bool DisableFCNs = false; 4 public void Init(HttpApplication context) 5 { 6 if (DisableFCNs) 7 return; 8 PropertyInfo p = typeof(HttpRuntime)....
阅读全文
摘要:1、<a>标签 示例代码:<a href=”a.aspx”>2、HyperLink控件 通过HyperLink控件的NavigateUrl属性。3、Response.Redirect()方法 会请求两个地址。 4、Server.Transfer()方法 只有一次请求,服务器内部实现跳转,并且不返回跳转前的页面。5、Server.Execute()方法 只有一次请求,服务器内部实现跳转,执行完跳转后的页面返回原页面继续执行。6、window.location.href=””;
阅读全文

浙公网安备 33010602011771号