how to read the content of the file using Fileupload

asp.net, c#

Solution

string inputContent;
using (StreamReader inputStreamReader = new StreamReader(InputFileUpload.PostedFile.InputStream))
{
    inputContent = inputStreamReader.ReadToEnd();
}

Problem

Is it possible to read the content of a file using Fileupload. For example I want to save the XML file in Database , a user search the file using Fileupload and then click a button to save the content of the file in Database. I tried this one but doesn't work ``` string s=Fileuploder1.Filecontent.tostring(); ``` but no success,Do you have any idea?

Original source