Pass the image file path as string in Bitmap


#1

Am trying to pass the path of the image as string parameter in bitmap but am getting the error “The given path’s format is not supported”

for ex : am using
strHTMLPath= "C:\HTML.png"
imgHTML =new Bitmap(strHTMLPath)

but it works well if I give the path as

imgHTML=new Bitmap(“‪C:\HTML.png”)


#2

Does this work? “C:\\HTML.png” … - with 2 slashes
Also, verify with Message Box or Write Line that strHTMLPath is outputting correctly.