Hi
I'm developing a project in ASP.NET C#, with SQL Server Express 2005, on Windows Vista.
I have a GridView, and a DetailsView on an aspx page.
The GridView displays all items in a database that has a certain ProductID (The items is Pictures)
The DetailsView displays the selected row of the GridView.
In the DetailsView I have 3 FileUpload controls, for 3 different size of images.
My update functionallity works just fine. I catch the OnUpdating event of it's ObjectDataSource, and uses FindControl to get each FileUpload Control, and executes the FileUpload.SaveAs() method if the user provided a new Image.
My problem occurs when I want to Insert a new image. No matter what - all my FileUpload's HasFile property is always false.
I was trying different things, and then I removed the UpdatePanel from the page. That solved my problem, but I really want to use the UpdatePanel. What I found really strange is, that the code very much identic to the code for inserting, works fine when I'm updating.
I use kind of the same idea as provided in this: http://www.asp.net/Learn/DataAccess/tutorial56cs.aspx?tabid=63 article. I just have an UpdatePanel arround both the GridView and DetailsView.
Any ideas on what might be wrong?
OnUpdating