易截截图软件、单文件、免安装、纯绿色、仅160KB

C#(asp.net)实现目录(无扩展名)重写

在2003系统下,按照在IIS6中网站右键属性-主目录-配置-在通配符应用程序映射-插入设置添加统配符,可执行文件选择C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll 注意“确认文件是否存在”这个选项不要选上
2 站点中引入UrlRewrting.dll
3 Web.config配置修改如下:
<RewriterConfig>
<RewriterRule>
    <LookFor>~/article/</LookFor>
    <SendTo>~/articlelist.aspx</SendTo>
</RewriterRule>
</RewriterConfig>
<httpModules>
    <add name="MyHttpModule" type="UrlRewriting.MyHttpModule,UrlRewriting"/>
   </httpModules>
   <httpHandlers>
    <add verb="*" type="UrlRewriting.Http404,UrlRewriting" path="404.aspx"/>
</httpHandlers>
4.效果测试:
http://www.xuehi.com/article/


相关文档:

ASP.NET(C#)常用代码30例

1. 打开新的窗口并传送参数:
  传送参数:
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>")
  接收参数:
string a = Request.QueryString("id");
string b = Request.QueryString( ......

在asp.net webservice中如何使用session

在使用asp.net编写webservice时,默认情况下是不支持session的,但我们可以把WebMethod的EnableSession选项设为true来显式的打开它,请看以下例子:
1 新建网站WebSite 
2 新建web服务WebService.asmx,它具有以下两个方法:
[WebMethod(EnableSession = true)]
public string Login(string name)
{
   ......

ASP.NET中String.IndexOf 方法的使用

String.IndexOf 方法 (value, [startIndex], [count])
  报告指定字符在此实例中的第一个匹配项的索引。搜索从指定字符位置开始,并检查指定数量的字符位置。
  参数
  value
  要查找的 Unicode 字符。 对 value 的搜索区分大小写。
  startIndex(Int32)
  可选项,搜索起始位置。不设置则从0开始。
......

ASP.Net 文件上传大小限制解决方案修改IIS7/7.5配置

IIS 7 默认文件上传大小时30M
要突破这个限制:
1. 修改IIS的applicationhost.config
    打开 %windir%\system32\inetsrv\config\applicationhost.config
     找到: <requestFiltering>节点,
  这个节点默认没有 <requestLimits maxAllowedContentLength="上传 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号