I am trying to load images from my computer to sql database when web application starts but I can't load image data to vb. It is giving file not found exception even though file path is right.
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
Dim imgpaths As Array = {"crslogo\data-science.png", "crslogo\python.jpg", "crslogo\acc.jpg"}
MsgBox(imgpaths(0))
Dim bArr As Array = {}
For i = 0 To imgpaths.Length - 1
Dim img As Image = Image.FromFile("crslogo\data-science.png")
bArr(i) = imgToByteArray(img)
Next
End Sub
User contributions licensed under CC BY-SA 3.0