I have the following fields in my table
Name NameId City
----- ------ -------
John Smith jsmith Brooklyn
Besides giving the ability for the user to enter the Name NameId, City, what I need to do is to give the ability for the user to upload a file where the name of the file that will be stored on disk will be the same name as NameId field. So for example the name of the file will be jsmith.jpg.
So what I need to do is to create a form where the user enters the Name, NameId, City. I also need to have a file uploader that will upload the image file. Once they submit, I would insert this record in the db table and save the file into the images folder where the name of the image file will be the same as the nameid.
In terms of what type of control to use for the user to enter the Name, NameId, City, and upload a picture, I was thinking about just creating a form and then having controls a text box control for Name, NameId, City and a image upload control for the image upload. Is there a better way of doing this with another control such as say a DataView control, etc. ??
Also when the user wants to edit the record – Name, NameId, City and the associated image – what would be the best way of going about doing this. I was thinking of having an edit button next to each record and then a modal window that comes which allows the user to edit the info (such as Name, etc and the image) . I am familiar with the GridView inline editing but not sure how the user would edit the image as there isn’t a file that we store that info at but merely look at the NameId in order to give it the same name.
I guess your requirement can be fulfilled by the following example :
http://demos.devexpress.com/ASPxGridViewDemos/GridEditing/TwoWayBinding.aspx
This is also a good example :
http://blogs.msdn.com/b/robburke/archive/2006/10/05/asp.net-2.0-quick-tip_3a00_-add-a-hyperlink-to-an-image-in-a-gridview-column.aspx