Active Server Pages - Page 2

If from an ASP page you try to use Response.Redirect after having written anything to the browser, you'll get an error saying that the page's headers have already been written. To avoid this you should put the code that checks if the browser needs to be redirected to another page at the very ...

Most ADO statements require special constants to be passed as arguments to method calls, as in:
rs.Open "Authors", cn, adOpenForwardOnly, adLockReadOnly, adCmdTable
The above line is surely more readable than:
rs.Open "Authors", cn, 0, 1, 1
but for ...

Most web sites heavily rely on client-side cookies. For example, ASP Sessions can work correctly only if the browser allows temporary cookies (that are not stored on disk). ASP doesn't provide any native method to understand whether cookies are enabled or not, but you can use the following ...

Internet Information Server introduced the notion "Isolation Level", which is also present in IIS4 under a different name. IIS5 supports three isolation levels, that you can set from the Home Directory tab of the site's Properties dialog:
Low (IIS Process): ASP pages run in ...

At times you may need to create a GUID from ASP, for example when assigning unique IDs to users that are visiting your site for the first time. While you can generate new GUIDs from VB quite easily with a call to the CoCreateGUID API call (as explained elsewhere in the Tip Bank, see below), you ...

Create a HTML table from a recordset
set the TableAttribs argument to a suitable value
(eg "BORDER=1") to modify the table's standard layout
you should omit the NullValues argument if you want that null
values are displayed in empty cells
set the ShowFieldNames to True to display field ...

The Scripting.Dictionary object is marked as having a "Both" threading model, which means that you can freely assign it to a Session or an Application variable. However, the actual threading model for this object is "Apartment", which means that you should use it only at the page scope level. ...

You should never use more than one script language on the same ASP page, for example by mixing pieces of VBScript with portions of JavaScript. The reason is that there is a limit to the number of script engines that ASP can cache.
When IIS processes an ASP file, it parses the script code ...

All include files appear to the ASP processor as belonging to the main ASP file, therefore they are read in memory and parsed as if they were physically pasted into the main ASP file. Therefore, while you should use include files for holding commonly used routines, you should be aware that the ...

Here's a collection of quick-and-dirty tips for improve the performance and the robustness of your ASP applications:
Use the Option Explicit directive to ensure that all variables are correctly declared and scoped. Mistyping a variable name is one of the most frequent ...

Advertiser Disclosure:
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.

Thanks for your registration, follow us on our social networks to keep up-to-date