ASP. Some suggestions on web standards in net development

Source: Internet
Author: User
Keywords Suggestion that is a few very
Tags .net advanced asp asp.net authentication based can directly change

Visual Studio.NET from 2003 to now 2008, along the way to slowly strong ... From the previous vs2003 can automatically change your HTML code to now in the vs2008 can directly to the HTML code for the standard authentication and hint, very difficult.

Forums are also often engaged. NET development of the novice friend asked some ASP.net development process and web standards conflict between the problem, in fact, is the client code generation problem. More advanced development level of things I can not say, from the front of the page from the point of view and share the suggestions:

Use less server-side controls in asp.net

In Visual Studio, there is a series of powerful controls that we're just beginning to learn. NET developers. But these controls in VS are mostly based on the WinForm pattern, and some controls are better for web development, such as:

Do not have everything add form runat= "Server", a friend said, do not add a form runat= "server" other controls a lot of it can not be used. Yes, we just need to add in the necessary places, indeed there is a form of place, naturally to add, but definitely not. NET default, all pages are under the Body tab The first label is form. This is unreasonable.

Use less control such as Asp:gridview, consider Asp:repeater control or write yourself a Third-party control, it is very simple, let the code output listen to you.

Replacing asp:label,asp:literal output with asp:literal is clean.

Less use Asp:linkbutton such controls, links are links, buttons are buttons, there is no need to engage in a LinkButton ...

The default form validation control is simple to use, but it is easier to write yourself.

In short, we want to focus on the quality of the output of the code, and some of the default controls do not achieve this requirement.

Use less frameset/iframe labels

In general Web pages to use frames page layout (header/sidebar/content/footer) is basically eliminated, of course, the background management of this type of application is still available, the front-end display of the page can not be, Visual Studio 2005 began, MasterPage, this is very convenient to use. This is actually similar to the early ASP include header.asp.

Less use of postback mechanism

. NET in the postback mechanism, has its reason, the reasonable use, the Internet product in the less use point is correct!

Look more mature. NET Open Source Products

For example: Microsoft Open Source Oxite, PetShop, Discuz Forum's. NET edition, BlogEngine, Cvbbs and so on, are all based on. NET development of a better example.

Pay more attention to client code quality

After all, browser-based, user experience, the standard of the Consortium, browser compatibility and so on, no good client code, are not supported.

Learn more about the necessary client knowledge

A lot. NET beginners don't know enough about html/css/javascript these client basics, especially JavaScript, and you'll find a lot of things you've been postback to the server before, The original JavaScript can be easily done on the client! Web development, this is the foundation!

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.