G
Guest
Hi there,
I quite new to posting in this forum.
I have a problem which I truly hope someone can help me out.
I have a master/detail page - with a gridview displaying company names, and
a DetailsView displaying the selected company from dridview.
I'm able to use the DetailsView to insert and update members of the site
(companies), but I have this problem with a FileUpload, which is bound to a
templatefield in the DetailsView control.
I have created an eventhandler for the DetailsView_ItemInserting in which
I'm validating whether a file was posted.
If the FileUpload contains a file, the filename should be set to a string
vallue, the file should be uploaded to a folder on the site and finally, the
object's property Logo from the DetailsView, should be set to the string
value.
I can upload the file and insert the record, but it doesn't come with the
logo in the database.
My question is now. How do I actually update the DetailsView/ or the
ObjectDataSource so that the logo property will be altedered if there's a
file and the changes are written to the datastore.
My app is build with dataclasses and ObjectDataSources in the presentation
layer and I therefore need a way to update the currently selected object (if
updating) or alter the new object before it's values are written via the
DetailsView back to the ObjectDataSource control.
Thanks in advance!
I quite new to posting in this forum.
I have a problem which I truly hope someone can help me out.
I have a master/detail page - with a gridview displaying company names, and
a DetailsView displaying the selected company from dridview.
I'm able to use the DetailsView to insert and update members of the site
(companies), but I have this problem with a FileUpload, which is bound to a
templatefield in the DetailsView control.
I have created an eventhandler for the DetailsView_ItemInserting in which
I'm validating whether a file was posted.
If the FileUpload contains a file, the filename should be set to a string
vallue, the file should be uploaded to a folder on the site and finally, the
object's property Logo from the DetailsView, should be set to the string
value.
I can upload the file and insert the record, but it doesn't come with the
logo in the database.
My question is now. How do I actually update the DetailsView/ or the
ObjectDataSource so that the logo property will be altedered if there's a
file and the changes are written to the datastore.
My app is build with dataclasses and ObjectDataSources in the presentation
layer and I therefore need a way to update the currently selected object (if
updating) or alter the new object before it's values are written via the
DetailsView back to the ObjectDataSource control.
Thanks in advance!