Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
DetailsView with FileUpload Control
i need some help:
i have a form with detailsView controls bounded to an ObjectDataSource.
inside the detailsView i have some textBoxes, dropDownLists and FileUpload control.
now the ObjectDataSource has another class to handle the insert method.
without the fileUpload everting is ok, but when i try to insert the file upload to the InsertParameters of ObjectDataSource, its not working.
any help will be appreciated!
here is the code...
[code]public void InsertNewShop(string title, string name, string phone, string site, string segment, object FileUpload)
FileUpload FileUpload1 = FileUpload as FileUpload;
string imagePath = "~/ShopsImages/" + DateTime.Now.ToString("ddmmyy_hhmmss") + FileUpload1.FileName;
string fullPath = HostingEnvironment.MapPath(imagePath);
//create shop object
shop newShop = new shop();
newShop.title = title;