The System.IO.DirectoryInfo class does not come with a method to copy a directory. In this article, we’ll see how to create a method to do that, and then use it in an ASP.NET page.
This article will go through the complete process of how to create a Web Service and then how to consume it in any ASPX page. We’ll do this entirely within the Visual Studio.NET. Our Web Service will convert Fahrenheit degrees to Celcius.
Unlike classic ASP which run in the same memory space as the IIS, the new ASP.NET runs as a process of its own. This gives us more flexibility, stability and power, especially when combined with the file. Using standard XML notation inside this file, we can attribute our process to do things that will make the Webmaster’s job a lot easier. We’ll take a close look at the ASP.NET process and the attributes available for us to play with.
In services like Hotmail, you have a list of contents in a table. If you allow the user to select rows and do something with them, you might want to make it more pleasing to the eye, by changing the color of the row when selected. You might also have a main control checkbox, that when clicked selects all the rows and also colors all the rows. In this article, we’ll see how to accomplish that in 2 parts: first how to create programatically the table and controls populating the checkboxes, and second we’ll create the Javascript functions that handle the client effect of changing colors.
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.
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.