| Sub Categories |
File_Management File_Upload |
File_Management File_Download |
| TOTAL: 24 Page: 1 of 2 |
|
Displaying Files with a Hyperlink to dowload it
Someone requested for help on displaying all the files in a directory with a Hyperlink to download it, and this is in reponse to that! It quiet simple! We use the DirectoryInfo and FileInfo classes of System.IO namespace.

| Hits: | 44 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |
Creating a simple File Reader
You can easily extend the code from Filling a ListBox Control with a File Listing so that the page also reads and displays the file. Just add in a TextBox control to display the file, and in SubmitBtn_Click just add in the code to retrieve the file's contents and display it in the TextBox control (for more on reading and displaying files see Read a file and print it out ).

| Hits: | 35 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |
Read a file and print it out
Use this code to quickly read and print out the contents of a file. You can also use this method to view the contents of ASP/ASP.NET files, or other code.

| Hits: | 42 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |
Reading Text Files in an ASP.NET Web Page
There are many real-world situations in which you may wish to read part of or an entire text file into a string variable in a Web page. To read a text file in classic ASP you would simply use the FileSystemObject. In fact, there is an entire FAQ category on the FileSystemObject at ASPFAQs.com. While you can use the FileSystemObject in an ASP.NET Web page it will impose some serious performance constraints. Rather you should use the classes provided by the .NET Framework to read files. This arti

| Hits: | 82 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |
Build a Touch Utility with .NET
If you've ever been involved in maintaining applications in a large organization or maintaining a commercial application, you'll appreciate how much easier it is to determine whether people have the correct file versions if you set the file date for each version to a consistent, easy-to-see date. Even if you haven't, you've probably seen commercial programs that use this technique More...

| Hits: | 25 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |
File and Directory Manipulation
There are several classes in the System.IO namespace which are very handy in the handling of directories and files. These include the File class, FileInfo class, Directory class and DirectoryInfo class. This tutorial concentrates on using the Directory class and the File class to do some simple manipulation of files and directories.

| Hits: | 63 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |
CreateFile
A replacement for the open() function in VB and the CreateFile() API Start a new project then add a module. Add the following code to the module:

| Hits: | 40 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |
Read and write text files with Visual Basic .NET
Years ago, when I first learned to program in BASIC, I came across a sample program for reading a text file. The OPEN command with the file number looked quite confusing, so I never wrote the program. Later, when I learned Visual Basic, I was shocked to see that the same file operations existed in VB. The basic file-handling commands had not changed; just a few more features had been added. advertisement With Visual Basic .NET, Microsoft introduced a new, object-oriented method for working

| Hits: | 119 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |
Code Sharing in ASP.NET Through Inheritance and Containment
Code sharing is in the mind of most programmers. The benefit of code sharing is obvious: not only is duplicated code avoided, but more importantly, maintainability is increased. Code sharing can be implemented in various ways, subject to the constraints of programming language and framework. Under object-oriented programming (OOP) model, one of the most common ways to achieve code sharing is inheritance (a.k.a. subclassing). Unfortunately, inheritance is not available to ASP web developers in th

| Hits: | 43 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |
Build CAB Files In .NET
Friday is here again, and this weekend I am taking my wife to the beach for her birthday. This got me thinking about packing my suitcase. Even though we will only be gone for 2 days, I feel compelled to pack enough clothing for every possible weather scenario. It's a sickness. Luckily, I have a suitcase that won't break when I sit on it to force it closed. If you feel compelled to stuff your hard drive with loads of files; Or, if you need to send compressed files over the wire, then the .NET

| Hits: | 131 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |
Simple Text File Operations in C#
C-Sharp provides a File class which is used in manipulating text files. The File class is within the System namespace. Also we can use the StreamReader and StreamWriter classes, which are within the System.IO, namespace for reading from and writing to a text file. In this article we'll see examples of Creating a text file, reading contents of a text file and appending lines to a text file. 1.Creating a Text File For creating text file we use the CreateText Method of the File Class. The Cre

| Hits: | 31 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |
Manipulate Files in ASP.NET
The whole concept of File Manipulation in ASP.NET revolves around the System.IO namespace. This namespace has the classes required for reading and writing file manipulations. This startup article explains the concept of file manipulations, such as reading from a file, writing to a file and deleting a file, in ASP.NET from the ground up. Creating a file and writing some content into it As mentioned earlier, we need to have the namespace "System.IO" in our ASP.NET page for file manipulations

| Hits: | 24 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |
Detecting File Encodings in .NET
So you need to read data from a text file, or possibly even a binary file? Do you need to read one byte or two for character arrays, a.k.a. strings? This is a common problem with anything file I/O operations today, especially since the de facto file encoding is Unicode these days, but applications must usually be able to work with older file formats and encodings, which are probably still ASCII files. You need a way to detect what the file encoding is, or leave it to the user to decide (and we a

| Hits: | 61 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |
Read a text file in ASP .NET
This article is a continuation of the article, Creating Text Files in ASP .NET. In this article, we will see read the text file which we created earlier. Things that we will be learning in this article 1. The namespace that is required to deal with Files 2. The StreamReader Object 3. Reading a Text File 4. How to capture errors which may occur while reading a text file? The Namespace that is required to deal with Files We require the namespace, System.IO to work with fi

| Hits: | 73 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |
Use a StreamReader in NETCOBOL for .NET
Framework has provided the ability to handle multiple languages. The Language compilers provided by Microsoft are for: C#,VB.NET,Managed C++ and JScript.NET. Apart from that one can also use "non-microsoft language" to develop applications using the .NET Framework. In my article i'll be showing a Demonstration to use StreamReader and NETCOBOL for .NET.Being programming in VB.NET for a longer time i'd explain this example comparing it with VB.NET. All the software that you need to code NETCOBOL f

| Hits: | 41 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |
File Merger and Splitter in C#
This program can be used to 1] break up a large file into several files AND 2] merge those files back into one single large file. This is particularly useful if there is a file say 2mb, and you want to save it to a floppy disk to transfer to another PC. Split the 2mb file into several files (you can specify how many files) in the first PC. Then copy those files (a number with extension "sg"). Place all the files in the same directory in the second PC. Use this program to merge those files.

| Hits: | 106 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |
Directory Browsing the .NET Way
From the 'Good Old Times' of ASP programming, many should remember the FileSystemObject object. It allows access to the file system for reading, writing and directory browsing. However, the object model is anything but perfect and as for binary files, the end of the tether is reached before we even start - it just can't be done. And there are some other functions and properties which I would have liked to have. It looks as if these wishes would be fulfilled by the .NET Framework classes in th

| Hits: | 42 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |
Viewing and editing file and directory attributes in ASP.NET
The System.IO.FileAttributes class gives us access to file/directory attributes. In this article, we'll see how to use this class to first read the current attributes and then change them. Published: Dec 2, 2002 | Last Edited: Aug 20, 2005 Tested with: ASP.NET 1.1 Category: ASP.NET 5,966 views Introduction The System.IO.FileAttributes class gives us access to file/directory attributes. In this article, we'll see how to use this class to first read the current attributes and then change

| Hits: | 30 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |
In-Memory Data Compression in .NET
With the proliferation of XML going back and forth over the wire, we have many advantages as .NET developers. SOAP standards, the ability to make remote procedure calls over HTTP through firewalls, the simplification of and seamless validation of B2B and B2C interchanged data via XML and Schema, ADO.NET with the ability to reference XMLData in either ADO DataSet or XMLDataDocument format, and much more. We also have some new problems, not the least of which is that our data encapsulated and t

| Hits: | 34 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |
ADSI and the .NET DirectoryServices Namespace
The release of the .NET Framework delivers numerous incredibly functional classes that make life easier for developers. The System.DirectoryServices namespace provides access to the Active Directory. The classes in this namespace can be used with any of the Active Directory service providers including Internet Information Services (IIS), the Lightweight Directory Access Protocol (LDAP), the Novell Directory Services in NetWare (NDS), and WinNT. These classes make it possible to do the followi

| Hits: | 63 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-20 |