OpenFileDialog.FileName to upload an image using vb.net to SQL Server 2008 -
i have code uploading photo in vb.net sql server. on openfiledialog
need imagename
, it's location in text field.
dim bmap image dim info idataobject dim fd openfiledialog = new openfiledialog() fd.title = "select image." fd.initialdirectory = my.settings.imagedefect fd.filter = "all files|*.*|bitmaps|*.bmp|gifs|*.gif|jpegs|*.jpg|pngs|*.png" fd.restoredirectory = false if fd.showdialog() = dialogresult.ok picturebox.imagelocation = fd.filename **txtimagefile.text = fd.filename**
in text field, have c:\users\susi\pictures\capture.png
how can capture.png
in text field? please help me, give thanks you.
use static methods of path class (path.getfilename)
txtimagefile.text = = path.getfilename(fd.filename)
vb.net sql-server-2008 image-uploading
No comments:
Post a Comment