.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 29th, 2003, 05:55 AM
Ivovh Ivovh is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 3 Ivovh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old January 1st, 2004, 12:36 PM
vanekl vanekl is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 229 vanekl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
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">

Reply With Quote
  #3  
Old January 2nd, 2004, 11:06 AM
Ivovh Ivovh is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 3 Ivovh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thx this was where i was looking for

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > Vb.net: Upload a file to a server


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT