Implementation of ASP. NET pseudo-static pages

Source: Internet
Author: User
[Switch] In fact, the so-called pseudo-static page refers to URL rewriting, which is very simple to implement in ASP. NET. The following is a simple process, so you don't have to read it.
First, you need to reference two DLL files in your project:
Actionlessform. dll
Urlrewriter. dll
Which of the following is true? Urlrewriter. dll, but if you want to implement paging, you must use this actionlessform. dll
First, write in Web. config <? XML version = "1.0" encoding = "UTF-8" ?>
< Configuration >
< Configsections >
< Section Name = "Rewriterconfig" Type = "Urlrewriter. config. rewriterconfigserializersectionhandler, urlrewriter"   />
</ Configsections >

< Rewriterconfig >
< Rules >
<! -- Rules for Blog content Displayer -->
< Rewriterrule >
< Lookfor > ~ /Read (. [0-9] *) \. html </ Lookfor >
< Sendto > ~ /Webform1.aspx? Userid = $1 < Ndto >
</ Rewriterrule >
</ Rules >
</ Rewriterconfig >
< Appsettings >
< Add Key = "Dbtype" Value = "SQL" > </ Add >
< Add Key = "Data" Value = "Server =.; uid = sa; Pwd = sa; database = pubs; Connect timeout = 30 ;" > </ Add >
</ Appsettings >
< System . Web >
< Httphandlers >
< Add Verb = "*" Path = "*. Aspx" Type = "Urlrewriter. rewriterfactoryhandler, urlrewriter"   />
< Add Verb = "*" Path = "*. Html" Type = "Urlrewriter. rewriterfactoryhandler, urlrewriter"   />
</ Httphandlers >


In this case, the suffix is invalid in iis.html (I don't know how to name it ...)
Then, perform the following operations:
Right-click my computer> Manage> Expand services and applicationsProgram'--> Internet Information Service --> Find the shared directory --> right-click Properties --> click 'configuration' -->
Ing the following --> Find. aspx executable file path copy path --> paste path --> the extension is ". html "--> then remove the check object check box to check whether the object exists.

Try it...

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.