Friday, January 9, 2009

File handling FAQ


1.What is the Disadvantage of using Filesystem Object for reading files?
Asp.Net imposes performance constraints on application

2.What are different types of classes provided in .net to read Files?
File and FileInfo.

3.What is difference between File and File Info classes?
File Class contain shared methods where as File info doesn’t. Shared methods are methods that can be invoked without requiring an instance of the class to invoke


//Using FilesDim objStreamReader as StreamReader objStreamReader = File.OpenText(FILENAME)


//Using FileInfo Dim fInfo As FileInfo = New FileInfo(path)Dim fstream as FilestreamFstream=finfo.open(filemode.open)

4.What is the enctype to be added to the form element while working with files?
enctype="multipart/form-data"


5. Where do you change the limit of file size to be uploaded?
In maxRequestLength attribute of HTTPRuntime element in Web.config file.

6. How do u handle Multiple files upload?
Using HttpFileCollection class.

1 comment:

  1. Please can you explain WPF,WCF,WF,WC,LINQ,Silver Light

    ReplyDelete