Results 1 to 1 of 1

Thread: [RESOLVED] how to add/remove images

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2012
    Posts
    10

    Resolved [RESOLVED] how to add/remove images

    Hi. I am using a fileloader to load a photo into a folder,but, I am having difficulty getting the photo to appear in the imagebox on the form. This is the code I'm using

    Protected Sub btnup_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnup.Click, btnup.Click

    If FileUpload1.HasFile Then
    Try
    FileUpload1.SaveAs("C:\inetpub\wwwroot\webapplication1\Uploads\" & _
    FileUpload1.FileName)
    Label1.Text = "File name: " & _
    FileUpload1.PostedFile.FileName & "<br>" & _
    "File Size: " & _
    FileUpload1.PostedFile.ContentLength & " kb<br>" & _
    "Content type: " & _
    FileUpload1.PostedFile.ContentType
    Catch ex As Exception
    Label1.Text = "ERROR: " & ex.Message.ToString()
    End Try
    Else
    Label1.Text = "You have not specified a file."
    End If
    If FileUpload1.HasFile Then
    Me.Image1 = Image.FromFile("C:\Inetpub\wwwroot\images")
    End If
    End Sub

    For some reason I am being told that the image part of image.file is error BC30561: 'Image' is ambiguous, imported from the namespaces or types 'System.Web.UI.WebControls, System.Drawing'.
    Any help with this would be gratefully appreciated.
    Thanks.
    Last edited by corkman; May 2nd, 2012 at 08:41 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width