Byte array in session variable

view full story

http://www.daniweb.com – I have an asp FileUpload and an asp Button on a page. When i click the button, i want the bytes of the file which was supposedly uploaded to be stored in a session variable. Only problem is that they aren't stored. How should i do this? There's also a text box with some text in it, need that too. protected void UploadButton_Click(object sender, EventArgs e)         {             if (FUpload.HasFile)             {                 Session["File"] = FUpload.FileBytes;                 Session["Name"] = FUpload.FileName;                 if (TextBoxEnc.Text != "")                     Session["Text"] = TextBoxEnc.Text;             }             else                 Response.Write("<script language='javascript'> alert('No image uploaded'); </script>");         }thanks ! Will come with additional questions. (General)