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

Tip/Trick: Url Rewriting with ASP.NET

 
People often ask me for guidance on how they can dynamically "re-write" URLs and/or have the ability to publish cleaner URL end-points within their ASP.NET web applications.  This blog post summarizes a few approaches you can take to cleanly map or rewrite URLs with ASP.NET, and have the option to structure the URLs of your application however you want.
Why does URL mapping and rewriting matter?
The most common scenarios where developers want greater flexibility with URLs are:
1) Handling cases where you want to restructure the pages within your web application, and you want to ensure that people who have bookmarked old URLs don't break when you move pages around.  Url-rewriting enables you to transparently forward requests to the new page location without breaking browsers.
2) Improving the search relevancy of pages on your site with search engines like Google, Yahoo and Live.  Specifically, URL Rewriting can often make it easier to embed common keywords into the URLs of the pages on your sites, which can often increase the chance of someone clicking your link.  Moving from using querystring arguments to instead use fully qualified URL's can also in some cases increase your priority in search engine results.  Using techniques that force referring links to use the same case and URL entrypoint (for example: weblogs.asp.net/scottgu instead of weblogs.asp.net/scottgu/default.aspx) can also avoid diluting your pagerank across multiple URLs, and increase your search results.
In a world where search engines increasingly drive traffic to sites, extracting any little improvement in your page ranking can yield very good ROI to your business.  Increasingly this is driving developers to use URL-Rewriting and other SEO (search engine optimization) techniques to optimize sites (note that SEO is a fast moving space, and the recommendations for increasing your search relevancy evolve monthly).  For a list of some good


相关文档:

关于asp.net Session丢失问题的总结


顺便提一下asp中Session的工作原理:
asp的Session是具有进程依赖性的。ASP Session状态存于IIS的进程中,也就是inetinfo.exe这个程序。所以当inetinfo.exe进程崩溃时,这些信息也就丢失。另外,重起或者关闭IIS服务都会造成信息的丢失。
asp.net Session的实现
asp.net的Session是基于HttpModule技术做的,HttpModule ......

ASP.NET编程的十大技巧


ASP.NET编程的十大技巧
发布日期:2008-08-03
1、在使用Visual Studio .NET时,除直接或非引用的对象外,不要使用缺省的名字
.NET带来的好处之一是所有的源代码和配置文件都是纯文本文件,能够使用Notepad或WordPad等任意的文本编辑器进行编辑。如果不愿 意,我们并非一定要使用Visual Studio .NET作为集成开发环境。 ......

浅析ASP.NET生成随机密码(转)

 实现ASP.NET生成随机密码功能是很容易的,下面的代码给出了完整的实现方法:
public static string MakePassWord(string PwdChars, int Pwdlen)
{
    string mpstr = "";
    int iRandNum;
    Random mrnd = new Random();
    for (int ......

Asp.Net Master模板页的控件和属性

 内容页访问MasterPage中的控件,有两种解决方案:
一、是用弱类型访问
    使用 FindControl 方法获取模板页的控件
    ((Label)Master.FindControl("Label1")).Text = "xxx";
  
二、给模板页添加属性来使用强类型访问(推荐)
    模板页定义;
&nb ......

如何在Asp.net使用模式对话框提交而不打开新窗口?

在项目中我要用到修改密码功能,修改密码页我是用模式对话框的形式弹出来的,当我按正常情况提交数据时,发现它会弹出一个新的窗口来显示修改成功信息,我想提交数据而不打开新窗口,
我的解决办法就是在head标签中加上base标签让target="_self",之前我想得有点复杂,想给它一个固定的alert,当成功修改时才显示 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号