Updating a session variable without postback
This means that a page developer is responsible for writing code that deletes the file from disk whenever the associated database records gets deleted.Also, to store uploaded files on disk, your web server needs permissions to write to the file system.Two common places are the hard drive of your server and a database.There has been a lot of debate on the Internet about the best way to store your files.
As a sample application, I'll build a small web site that allows you to upload files and store them at a location that you determine.
Instead of performing all the code directly in the code behind of the ASPX pages, this application uses a number of separate classes that each perform a limited set of tasks.
If you're not interested in the design of the application or the pros and cons of storing files in the database, you skip directly to the code that shows you how to save files in the database and retrieve them again.
I tested the application and everything seems to work fine. The full VB code is available in the Downloads section at the end of this article.
Besides showing how to store files in the database and retrieve them again, this article also presents a little demo application that demonstrates the concepts from this article.
Search for updating a session variable without postback:
While I don't have any hard figures to support this, the "word is" that it's slow.