|
I used DataList to make a list of pictures. I want to add the selected pictures to the album.
for (int i = 0; i <DataList1.Items.Count; i ++) // Cycle the collection of DataList1
{
if (xx.checked) // If the picture is selected
{
int id = e.Item.FindControl ("label1") // Remove the ID of this image
int classid = 1 // album id
................. / Execute the stored procedure
}
}
This is my implementation method. This loop judges which picture is selected. If selected, the picture id and album ID are passed to the stored procedure and executed once. If 10 are selected, this loop executes the stored procedure 10 times, so that 10 pictures are modified.
What can I do to execute the stored procedure once to modify these 10 pieces of data. What should be written in the stored procedure
Heroes had better post some code. My little rookie |
|