Hiiiiiiiiiiiiii
I’m beginner in vb.net
And I’m going to build a page that contains a file up loaded (web server control)
How to insert a submitted item from file up loaded and save it in a data table object???
I need the VB code
thanks
thanks
for your replay.........
but i want to save the picture into a data table object that I will create it in the code behind not in a data base.......
please any help
Hi.
You can try this method. "FileUpload1" is server-control.
Good luck
Protected Sub cmdOK_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdOK.Click
Dim _fileName As String = Request.PhysicalApplicationPath & FileUpload1.FileName
Dim _byte() As Byte = FileUpload1.FileBytes()
Dim _file As New IO.FileStream(_fileName, IO.FileMode.Create)
For _i As Integer = 0 To _byte.Length - 1
_file.WriteByte(_byte(_i))
Next
_file.Close()
'-----------------------
' DO SOMETHING
End Sub
here i have to create a file using System.IO.Directory
but i do not know exactly how to do it
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.