Need advice on sequence ...

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top