1
Thanks for reply manav but the snippet is same code which i am trying. but i am getting scroll bars or part of image is lost.Try for .bmp files for which height and width are more than of the screen size/asp page.Plz try
1
Hello
I have implemented this demo in my system .
I got perfect output as you required
Note : Image also take place in whole page i.e 100% width
Find Following Snippet :
- protected void btnDisplay_Click(object sender, EventArgs e)
- {
-
-
- string MyImage = "Images/" + "textToImage20180117144937.png";
-
-
- string localstr = Server.MapPath(MyImage);
-
-
- Byte[] bytes = File.ReadAllBytes(localstr);
-
-
- string base64String = Convert.ToBase64String(bytes, 0, bytes.Length);
-
-
- Image1.ImageUrl = "data:image;base64," + base64String;
- }
Thanks
All the best :)