|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Vb.net: Upload a file to a server
I am making a vb.net application that makes pictures with a webcam and then store them on my hard drive, now i want to upload this files to a webserver, doesn anybody know how this can be done in VB.net or does anybody knows an site where is descipted how this could be doen.
|
|
#2
|
|||
|
|||
|
Not exactly sure what you're asking for
but if you just want to be able to upload a file to a web server then something like this works: Private Sub btnUpload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpload.Click Dim newfilename As String ... Dim Length As Integer = CInt(txtAttachmentName.PostedFile.InputStream.Length) Dim ContentType As String = txtAttachmentName.PostedFile.ContentType ... Dim Content As Byte() ReDim Content(Length) txtAttachmentName.PostedFile.InputStream.Read(Content, 0, Length) newfilename = saveFile(Content, Length, txtAttachmentName.PostedFile.FileName) ... End Sub And the HTML: <input class="text" id="txtAttachmentName" type="file" maxLength="255" size="38" name="FileToUpload" runat="server" Width="240px"> |
|
#3
|
|||
|
|||
|
thx this was where i was looking for
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > .Net Development > Vb.net: Upload a file to a server |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|