Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
Search the Tips
Tip Bank > Web Development > Active Server Pages

Active Server Pages - Page 2

21-40 of 432     Previous     Next
Redirect the browser when the output has already been sent
by Marco Bellinaso
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 ...
Use sp_executesql To Execute Dynamically Built SQL Statements in SQL Server
by Christoffer Hedgate
There are two ways in SQL Server to execute a T-SQL statement that has been dynamically built. The most common one is using EXECUTE to run ...
Getting a Browser's Name and Version in ASP
by Pratibha Gupta
There are two ways to get the browser name and version in ASP. One is the client side method and other is the server side method. Given below is client-side method, which requests a server ...
Encapsulate Your Main Body in a Main Subroutine
by Trong Ha
Global variables can lead to problems that are difficult to debug. It is very easy, for instance, to accidentally access a global variable from a function when you think you are using a local ...
Close Connections When You Are Finished With Them
by Trong Ha
By proactively closing connections when they are no longer needed, you reduce demand on the database server and make resources available to other users. Connections are closed when they go out of ...
Setting the Expiration Date in ASP
by Pratibha Gupta
Records can be deleted depending upon an expiration date in ...
Alternative to Using
by Alex Whyte
Use this code to notify a form that displays another form when the displayed form is closed
Order By Column Not Row with rs.Getrows
by Wayne Johnson
This ASP script will enable you to order your database by columns instead of the default by rows, which is not easy on the eye. Due to the way HTML tables are written in code, you can only return ...
Use Global.asa Metadata directive to access type libraries
by Francesco Balena
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 ...
Let ASP determine whether cookies are enabled
by Francesco Balena
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 ...
Understanding IIS Isolation Levels
by Alberto Falossi
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 ...
Create a GUID from ASP using SQL Server
by Francesco Balena
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 ...
RecordsetToHTMLTable - Convert an ADO Recordset to a HTML table
by Francesco Balena
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 ...
Use SET When Referencing Values in an ADO RecordSet
by Andrew Holliday
When referencing recordset values in your ASP code, don't use the commonly used
Don't Cache ADO Database Connections in the ASP Application Object
by Andrew Holliday
If you do, then all the pages will fight for the use of this connection. In addition, don't cache an ADO connection in the Session object. If you do, a database connection will be created for ...
Use Copy Web to Deploy a Web Application
by Anil Bhimavarapu
Instead of copying all the files manually you can use the Copy Web Application feature in Visual InterDev 6.0 to easily move your Web application from one server to another. This feature gives ...
Beware of the Dictionary object in ASP pages
by Francesco Balena
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. ...
Don't mix script languages on the same page
by Francesco Balena
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 ...
Large or nested include files can affect ASP performance
by Francesco Balena
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 ...
Miscellaneous tips for improving ASP performance and robustness
by Francesco Balena
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 ...
21-40 of 432     Previous     Next
Sitemap