How to cast HTTTPpostedFile in asp.net
-
Hello, I am developing Web Application in that I am storing HTTPPostedFile in Datatable.But after that I am not able to fetch that File in HTTPPostedFile object. I had written code as, HttpPostedFile obj_Posted; sobj_Posted =((HttpPostedFile)dt.Rows[0]["HttpPostedFile"]).FileName; But here error comes as invalid type cast swapnil Bhavsar
-
Hello, I am developing Web Application in that I am storing HTTPPostedFile in Datatable.But after that I am not able to fetch that File in HTTPPostedFile object. I had written code as, HttpPostedFile obj_Posted; sobj_Posted =((HttpPostedFile)dt.Rows[0]["HttpPostedFile"]).FileName; But here error comes as invalid type cast swapnil Bhavsar
Hi, What is the datatype of the column of the table into which you are storing the file?
Thanks and Regards, Chetan Ranpariya
-
Hello, I am developing Web Application in that I am storing HTTPPostedFile in Datatable.But after that I am not able to fetch that File in HTTPPostedFile object. I had written code as, HttpPostedFile obj_Posted; sobj_Posted =((HttpPostedFile)dt.Rows[0]["HttpPostedFile"]).FileName; But here error comes as invalid type cast swapnil Bhavsar
Try this logic http://www.aspnettutorials.com/tutorials/database/Save-Img-ToDB-Csharp.aspx[^] You need to save it and then use the file.
Vasudevan Deepak Kumar Personal Homepage Tech Gossips