Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


loading image from folder


loading image from folder

Author
Message
corkman
corkman
Forum God
Forum God (397 reputation)Forum God (397 reputation)Forum God (397 reputation)Forum God (397 reputation)Forum God (397 reputation)Forum God (397 reputation)Forum God (397 reputation)Forum God (397 reputation)Forum God (397 reputation)

Group: Forum Members
Posts: 1, Visits: 6
Hi. I am trying to load an image from  folder to an image box. This is the code I am using.

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

If FileUpload1.HasFile Then

Try

FileUpload1.SaveAs("C:\Inetpub\wwwroot\WebApplication1\images" & _

FileUpload1.FileName)

Label1.Text = "Image Loaded"

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

Image1 = System.Drawing.Image.FromFile("C:\Inetpub\wwwroot\WebApplication1\images")

End If

End Sub

I am getting a message:value of type'system.drawing.image' cannot be converted to 'system.web.UI.webcontrols.image'   Any help with this will be gratefully appreciated.

Corkman

GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search