devxlogo

Tip Bank

Create a Directory From an ASP Page

Question: How do I create a directory in ASP? Answer: Use the ‘CreateFolder’ method of the FileSystemObject object. Set fs = Server.CreateObject(“Scripting.FileSystemObject”)fs.CreateFolder (“foldername”) Obviously, you need to have proper permissions

Strip Leading Zeros in ASP Output

Question: How do I strip off leading zeros from data displayed from an ASP page? Answer: Use the FormatNumber function.If value = “0000046” Then FormatNumber(value,0) will result in 46. FormatNumber(value,2)

Prompt for Password in a Separate Dialog

Question: I want to display the “Enter Network Password” box when a user accesses my site. I can display an ActiveX control on my HTML page (ObjectID Tag) but it

Create an Instance of an ActiveX Component

Question: I am using Visual InterDev to create a data-driven Web application. How do I create an instance of a user-defined ActiveX component in Visual InterDev? I have created an

Generate Numbers at the Server End

Question: How do I generate numbers at the server end? I have an application in which I am accessing data from an Access database and I want to define each

Using ASP as Opposed to HTML Files

Question: I have been testing the delivery of ASP pages versus HTML pages and found that there is a considerable difference (ASP = 1 per sec / HTML = 187

Session Abandon Does Not Stop Back Button

Question: I have a session variable that keeps track of a user name and is set through a login page. Every page in the application first checks for the session

Display Currency Fields in ASP

Question: I am querying an Oracle field that comes back in the format of 25.5. Because this is a currency field, I’d like to manipulate it so that it shows

Display a ‘Loading…’ Message in ASP

Question: How can I show a ‘Loading…’ message till my ASP page loads? Answer: Use the following code to create a “pgLoading.asp” page. Pass to it as a parameter the