Discussion: removed Form

Source: Internet
Author: User
In Discuz, they used the template mechanism to remove the Form flag, because they seldom use server-side controls, so the page looks quite fresh, unlike the asp.net program we generally develop. No matter what it is, especially when a page with a master page is used, a viewstate is first created at the beginning. The viewstate control is not good, which affects the page loading speed, in addition, all the IDs in it become smelly and long, such as _ ct100 _ *********************, which makes it very painful to obtain the IDS,
The latest project requires that we remove all form, that is, there should be no form on the page, for example, 58.com. although he used url rewriting, he changed all aspx suffixes to shtml, but we know that it was developed by asp.net! However, his page is refreshing and there is no form. In addition, we do not use server-side controls for Data Binding. Generally, we place a static text control and then use dr. read (), and then use stringbuilder to append the string. In this way, the data is bound to the dll, avoiding the use of server controls and loading a lot of unnecessary viewstates, in addition, the server control is translated into table, but not div + css.
However, after the form is removed, many problems will emerge. For example, Page. ClientScript. RegisterStartupScript cannot be used! The ability to directly write js in the background is lost, because response. write will destroy the page structure, because it is independent of the page output. Therefore, it is very painful to define many global variables on the page, and then let the front-end js accept these variables and set the corresponding js functions based on these variables.
So what I want to discuss is that if the template mechanism is not used (because the project has been developed, it cannot be changed significantly ). How can we achieve better without a form, mainly the ability to interact between the front and back ends,
1. How to remove the traces of asp.net development to make the page more fresh
2. Is it necessary to remove the form, because its loading does make good resources! However, we do not need to use form on some pages.
For other questions, you can also discuss how to make better use of the features of asp.net, but it is not obvious! The template mechanism of discuz is very good, but you do not know what better insights do you have except the template mechanism!
Dudu is on the homepage for discussion!

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.