S
shapper
Hello,
I have a ListView with a LinqDataSource on a page.
On the EditItemTemplate I am inserting data to a database and
uploading a file.
I am using a TextBox and FileUpload control.
The LinqDataSource is connected to a table with the following columns:
FileID (GUID), Description, Path
The objective is:
1. Rename the filename to FileID.extension.
2. Place the file in Assets/Documents
3. Insert file properties, including full Path in the table.
And if something goes wrong undo what was done. This is a very
important condition!
I am trying to do this on the Inserting and Inserted events of the
LinqDataSource.
The problem is that I am not able to avoid a database access on the
Inserted event.
Could someone help me with the sequence and procedure to do this?
The code is not the problem ... just the sequence to do this.
Thanks,
Miguel
I have a ListView with a LinqDataSource on a page.
On the EditItemTemplate I am inserting data to a database and
uploading a file.
I am using a TextBox and FileUpload control.
The LinqDataSource is connected to a table with the following columns:
FileID (GUID), Description, Path
The objective is:
1. Rename the filename to FileID.extension.
2. Place the file in Assets/Documents
3. Insert file properties, including full Path in the table.
And if something goes wrong undo what was done. This is a very
important condition!
I am trying to do this on the Inserting and Inserted events of the
LinqDataSource.
The problem is that I am not able to avoid a database access on the
Inserted event.
Could someone help me with the sequence and procedure to do this?
The code is not the problem ... just the sequence to do this.
Thanks,
Miguel