c# .net Adsense ADO.NET Linq Viruses/security asp.net MVC JQuery Angular-js Node-js SEO Java C++ SQL API Networking vb.net .Net Css JavaScript Generics c#.Net entity framework HTML Website host Website Construction Guide HTTP tutorial W3C tutorial Web Services JSON Psychology Ionic framework Angular ReactJS Python Computer Android
c# .net

How to convert bytes to stream using asp.net c#?

| | ASP-NET , CSharp

In this article you will learn about how to convert url to stream using Asp.NET C#.

using System.Net;

using System.IO;

 

private Stream urltostream(string url)

    {

        WebClient wc = new WebClient();

        byte[] bytes = wc.DownloadData(url);

        Stream stream = new System.IO.MemoryStream(bytes);

        return stream;

 


    }