J
James Page
I have a aspx page where the user selects a image to upload to a sql
database. In the code behind on the item_inserting event i am halting the
insert event if the user has not selected an image file. Here's the select
case code:
Select Case fileExtension
Case ".gif"
MIMETypePic = "image/gif"
Case ".jpg", ".jpeg", ".jpe"
MIMETypePic = "image/jpeg"
Case ".png"
MIMETypePic = "image/png"
Case Else
e.Cancel = True
Exit Sub
End Select
What i'd like to do is alert the user with a pop up box that the file was
not a valid image file. I think this requires some form of clientside script.
can anybody advise how to do this?
database. In the code behind on the item_inserting event i am halting the
insert event if the user has not selected an image file. Here's the select
case code:
Select Case fileExtension
Case ".gif"
MIMETypePic = "image/gif"
Case ".jpg", ".jpeg", ".jpe"
MIMETypePic = "image/jpeg"
Case ".png"
MIMETypePic = "image/png"
Case Else
e.Cancel = True
Exit Sub
End Select
What i'd like to do is alert the user with a pop up box that the file was
not a valid image file. I think this requires some form of clientside script.
can anybody advise how to do this?