Quantcast
Channel: ASPSnippets RSS Feed
Viewing all articles
Browse latest Browse all 4778

Convert HttpPostedFile to Base64 string in ASP.Net using C# and VB.Net

$
0
0
Here Mudassar Ahmed Khan has explained with an example, how to convert HttpPostedFile class object to Base64 string using C# and VB.Net. The HttpPostedFile class object holds the File data for the ASP.Net FileUpload control. In order to convert HttpPostedFile class object to Base64 string, first the HttpPostedFile class object is converted to Byte Array using the ReadBytes method of the BinaryReader class is used. Then the Byte Array is converted to Base64 string using the ToBase64String method.

Viewing all articles
Browse latest Browse all 4778

Latest Images

Trending Articles



Latest Images