Modify the template class for asp. net1.1 Development

Source: Internet
Author: User

The StringTempletReplet. dll component updates some algorithms. It mainly depends on the values in the static variables in the memory. In this way, asp. net1.1 is used to develop the template class, so that the template is not changed. Cache template, cache delegate, cache tag parsing data. However, this will consume more memory.

In order to dynamically change the template, you have to check the file time each time. This consumes a lot of time. In the future, we may remove the function of dynamically changing templates and only provide an interface to notify the template class to re-read the template file.

Canceled this page RetuenString. aspx -- accept the tag string and return the parsing result)

After all, tags are not made into a scripting language. This function is meaningless.

Before introducing the asp. net1.1 development template class, let's briefly introduce it. Some people say they don't know how to use this template class. In fact, the main function of the template class is not the whole page template. It mainly refers to the read page fragment template. Read fragments, parse, and display.

In the Web site, such as blog development. Custom Skin page. In other words, the updates of news systems on all static pages play a major role.

The tag function is extended by the tag parsing function. Therefore, the execution speed of the template class is not only the speed of the StringTempletReplet. dll component itself. The execution time of the tag parsing function is also added. The tag parsing function provided in my example only returns a simple string. It is for convenience. The template class only provides a stage. And try to make the execution of the template class faster. How long is the tag parsing function executed. That is the use of people.

The regular expression replacement template class has also been written. However, you can perform tag locating analysis on a string of more than 2 million characters. It is more than eight times slower than pointer positioning. When the template string length is continuously reduced. The gap may be reduced. However, even if the two tags are located at the same time. According to the unchangeable character string, constant replacement of a character string will generate a new character string. Resource consumption is too high.

Business. cs can be placed on the UI or logic layer. You only need to inherit the FunctionList class. To inherit this class, you only need to override the static constructor. Create a tag and a tag execution function in the static constructor.

In fact, an execution label has been written in previous versions. Add the "execute _" mark before the tag name.

 
 
  1. {$ Execute _ Tag Name: parameter 1: parameter 2: parameter 3: character 10 $}

In this way, you do not need to override the static constructor. Is executed through reflection. But the speed is slow. It was canceled later. After all, the speed is critical for the template class.

I don't have a fixed location for you to download. In the past, the compressed file was supposed to be a GIF image. To Netease's personal data. However, Netease then detected the image. This makes everyone unable to proceed. I'm looking for a new location. The Image Location varies.

As long as the image has not been deleted. You can change the image at this location to the Templet.rar file.

The above are some modifications to the asp. net1.1 development template class, and I hope to help you.

  1. ASP. net mvc jQuery Delete Link
  2. Introduce jquery jqrte control in ASP. net mvc Framework
  3. Sample ASP. net mvc project: Suteki. Shop
  4. Example of ASP. net mvc three-tier architecture
  5. The concept of dependency injection in ASP. net mvc Architecture

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.