I have a button to upload images into a folder and then these images appear in a drop down list and I can choose an image to delete;
it's working fine but when the image name is at the beginnning of the drop down list it won't get deleted why?
upload button code:
protected void UploadButton_Click(object sender, EventArgs e)
{
if (FileUploadControl.HasFile)
{
try
{
string filename = Path.GetFileName(FileUploadControl.FileName);
HttpPostedFile pf = FileUploadControl.PostedFile;
System.Drawing.Image img = System.Drawing.Image.FromStream(pf.InputStream);
int imgwidth = img.Width;
int imgheight = img.Height;
System.Drawing.Image bm = System.Drawing.Image.FromStream(pf.InputStream);
if (imgwidth > 200 && imgheight <= imgwidth)
...
Go to the complete details ...