7th Chapter Debugging and error handling
The basic skills required to use ASP are described earlier, and the other issue in this chapter is what to do when an ASP error occurs, and what happens when an ASP goes wrong. When a carefully choreographed
7.4.2 VBScript error handling
In VBScript, you can make the script interpreter not handle any errors it finds, and continue to run the next statement using the On Error Resume Next statement. Once this statement has been processed, the script engine
Using the ServerVariables Collection
When discussing the content of the request object, one of the collections to be studied is the ServerVariables collection. This collection contains a combination of two values, one that accompanies the page
1. Operation HTTP Header
We have seen in several places how ASPs Create or modify the HTTP headers that are sent to the customer in response to a page request. There are several properties and methods in the response object that can help us do a
(1) Traversing the code of the Contents collection
To traverse the Contents collection, you can use a For each ... Next structure. Each item in the collection can be a simple variant type variable, a Variant array, or a reference to an object.
Examples of 4.2.3 server-side include directives
This section provides sample pages that you can use to experiment with a variety of server-side include statements. Opens the subdirectory Chapter04 for the sample Web page, displaying the SSI
There is a program that is to add and remove elements from the application collection, as follows:
the Application object
the ASP application
If Len (Request.Form ("Cmdadd")) Then ' use whether length for 0来 judgment
Strvarname = Request.Form
When one day, your mood suddenly become very bad, but coincidentally, in your guest book, your net friend left a very exciting words, so you quickly regained the happy mood. But after a while you're feeling bad again, but this time you're not as
In order to fulfill my commitment to you, we will now write the "Database and ASP Program", which can be applied to both IIS and PWS security pages carefully.
Sneak peek, or let's take a look at the ASP program (password.asp) first.
Function
String path = new DirectoryInfo (".. /"). fullname;//the parent directory of the current application path
Get the current directory to use Appdomain.currentdomain.basedirectory.
Gets the parent directory Path.GetFullPath ("..") of the current
ASP tutorial. NET uploads and downloads files using server controls
The first step, select Upload file. Every two steps to determine the file format. The third step, specify the storage directory, step fourth, save the file.
No more nonsense.
Type: System.Web.HttpRequestWhen the browser requests a page from the server, this behavior is called a request.The methods and properties of the HttpRequest class are exposed through the request properties of the HttpApplication, HttpContext, page,
string s = String.Empty;string s = "";string s = null;
The first 11th is a string variable that points to an empty string, and S does not occupy storage space. s variables can be used, such as S.length.The second defines an empty string that points
Because Silverlight is a client and cannot support session, we do sometimes need to use this session, For example, through the ASP tutorial. NET login page landing, record after session, I now want to use this session in Silverlight, have friends
String s= "$2.00";S.replace ("$", "");S.trim ();
System.text.encoding.default.getbytecount (Fox); Get string length, one character equals two characters
Acquiring the location code of Chinese charactersbyte[] array = new BYTE[2];Array =
ASP tutorial. NET foreach Traversal arrayThis tutorial takes two examples to illustrate the use of foreach, where you get all the files from a specified directory and use a foreach traversal to show it. */
string pathstr =
\\\ 'Example AS: put a 24-hour online user in the database into an EXCEL file\\\ 'Author: Steel worker\ 'Email: hello_hhb@21cn.com\\\ 'Date:\\\ 'Test: passed the TEST in NT4, SP6, SQL SERVER 7.0, and EXCEL2000%> generate an EXCEL file EXCEL for
System learning ASP begins with several built-in ASP objects.Five objects: Request, Response, Server, Session, and ApplicationLet's take a look at the Request object today.Of course, what has not been mentioned yet is what ASP is like? How do I know
Are you satisfied with your own database design? Are you sure you don't want to deal with it? For example, creating a new database table, such as creating or modifying a field ...... Of course, these are the columns of the design database.In this
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