ASP.NET Design Control Purification Website Language (1)

zhaozj2021-02-16  76

2003-09-28 ■ Oriental wants to know ■ Yesky

First, the overview Considers this situation: You write an application for a web site, its function is to accept the user's input and save the input content permanently, such as saving to the database, and display the user on the website The content, such as the forum is a typical example. If the user's source is very mix, you must consider how to prevent users from submitting and posting an aggressive (or porn, vulgar). Possible solutions include: align = "Right" marginwidth = "0" marginheight = "0" src = "http://images.chinabyte.com/adjs/iframe-pip/y-software-pip.html" frameborder = "0" width = "360" scrolling = "no" height = "300"> (1) Limiting the user group to a closed user group, that is, the user must be registered / logged in before using the program function. In this way, since the contents of each submit can be trapped to the submitter, the possibility of user destroying the rules of the website is much smaller. If you have anything you should do, you can verify the identity of the user and processed accordingly. (2) Before the content submitted on the website, the administrator is reviewed first. Many times, this approach is not necessarily available because of the limited human resources. (3) Prohibition of users from submitting an aggressive content. This is the ideal solution to solve problems in the origin. But what should I achieve? The scheme described herein is based on a composite control, using an XML file to define an aggain word. We will write this composite control with VB.Net, complete the construction of the entire project with a normal text editor and command line compiler (VBC). Before you formally write controls, first we will simply review the concept of the control in the ASP.NET. All controls that appear in this article are server controls, which are run on the server and send HTML code to the client. To understand the classification of the control, it can be observed from the control to the web form page (thus using the on-demand mode) or a pre-compiled angle. Microsoft defines the following ASP.NET Server Control: HTML Server Control, Web Server Control, Verification Control, User Control. The first three control readers should be more familiar. For developers, they are the simplest control type, and it has been written by Microsoft in ASP.NET. User controls are different. User control is "Pack" into a .ascx page form. Other .ASPX page can call the user control functionality by registration and instantiation. This is a highly hopeful server-side control. For ASP / ASP.NET developers, it represents a big progress, especially, and now writes the language of the control has fully supported object-oriented technology. ASP.NET User Control consists of one or more server controls, static HTML elements, which can contain additional code, and each user control encapsulates a set of features. User controls can be extended by simply extending existing Server Controls (Control Groups), for example, a graphic control with a rotating function, saves the date of the date in the text box.

1 2 3 Next Page

转载请注明原文地址:https://www.9cbs.com/read-21092.html

New Post(0)