In classic ASP it’s very easy to get the size of a folder since the FileSystemObject (FSO) class includes a Size function. In ASP.NET there is no such function provided, so we’ll see how to create one, extending the System.IO.DirectoryInfo Namespace.
Recent Blog Posts
We will create a custom 404 Response error page in ASP.NET, which will produce a friendly output to the user and send an email to the webmaster letting them know about the broken link so they can fix it.
We’ll see how to create a menu system that is cross-browser and includes all your site’s folders/files. It uses ASP, XML and DHTML and by simply copying it to your site you have an instant Windows Explorer-like navigation of the contents.
Using the File System Object (FSO) we can traverse through our website’s contents and write them out in a nicely nested form in an XML file. We can then use that file for example, in a content management system or a TreeView control.
Following an article on how to do this using ASP 3.0, we’ll see how to accomplish the same effect using ASP.NET. Using streams, we can provide a file to the user without the need for FTP or any interference of the Internet Information Server (IIS).
In this article, we will see how to allow a user to download any file from our web server. They will see a prompt, giving them the option of opening or saving it, rather than simply opening it which is the default. We can achieve this using the FSO and ADODB objects.
Instead of passing a SQL query through your ASP code against Microsoft Access as you would normally do, you can use the Queries design interface to create them in Access and then call them from your ASP code. It makes things easier to edit and maintain, and the results are returned faster.
Expanding on a previous article, we will see how to add 2 new methods to our class: one that inserts a new record in our table and another that edits an existing one. Use them against any table with just a few lines of code.
Mixing HTML and ASP code can be very difficult to maintain. Concatenating long strings in the code makes things difficult to read, and switching back and forth between ASP code and HTML can be very inefficient. Worst of all, you cannot use your HTML editor to edit the content presentation just as you usually do; you have to edit everything by hand. In this article we’ll see how to solve this issue using HTML templates.
If you have ever used Hotmail’s Rich Text Editor and wondered how they do it, then this article will shed some light on that. An IFrame works like a frame but lives within your page, thus creating inline frames. Without the need of applets or ActiveX, it’s possible to use that and create an online content editor that resembles and works like your favorite word editor.
Also known as Index Server, it catalogs your website, allowing your visitors to search against your content. This article goes through installing the Indexing Service on Windows 2000, pointing it to your web site, tuning it for speed and efficiency, showing you how to use it with some sample code against the ADO, and what to do if it fails.
The GetRows method of the ADO object is known to be the fastest way to fetch a recordset. By encapsulating the logic within a VBScript class, it’s possible to query your database and return your records to a local array in only 3 lines of code.