Posted on: 4/30/2011 12:40:57 PM | Views : 262

Hello,
I have an aplication where users will upload pictures but I want to check to make sure it is a certain size before it is upload. I use the file system, I do not store the image directly into the database.
Here is my code:
 
Protected Sub DetailsView1_ItemInserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DetailsViewInsertedEventArgs) Handles detailsSellerInsert.ItemInserted Label10.Text = "Your information has been submitted." If e.AffectedRows > 0 Then 'Determine the maximum PictureID for this user Dim results As DataView = CType(maxPictureDataSource.Select(DataSourceSelectArguments.Empty), DataView) Dim pictureIDJustAdded As Integer = CType(results(0)(0), Integer) 'Reference the FileUpload control Dim imageUpload As FileUpload = CType(detailsSellerInsert.FindControl("imageUpload"), FileUpload) ...

Go to the complete details ...