C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Interview   Jobs   Projects   Offshore Development    
Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing | Talk to Us |



My Profile

Gifts

Active Members
TodayLast 7 Days more...







How to convert HTMLinput file to Bytes


Posted Date: 05 May 2008    Resource Type: Code Snippets    Category: C# Syntax

Posted By: Abhishek Arya       Member Level: Diamond
Rating:     Points: 10



The following code sample shows how to convert HTMLinput file to Bytes
Public Function GetByteArrayFromFileField(ByVal FileField As HtmlInputFile) As Byte()
Dim intFileLength As Integer, bytData() As Byte
Dim objStream As System.IO.Stream
If FileFieldSelected(FileField) Then
intFileLength = FileField.PostedFile.ContentLength
ReDim bytData(intFileLength)
objStream = FileField.PostedFile.InputStream
objStream.Read(bytData, 0, intFileLength)
Return bytData
End If
End Function




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: How to get The IP address
Previous Resource: Win32 Paused Services
Return to Discussion Resource Index
Post New Resource
Category: C# Syntax


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

it help desk

Contact Us    Privacy Policy    Terms Of Use