Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>While Databinding a MemoryStream to a Image is not possible, it could be possible to use a Label/GenericControl, some Code and the <a href="http://en.wikipedia.org/wiki/Data_URI_scheme" rel="nofollow noreferrer">data URI scheme</a> to embed Images in Pages, but there are severe issues with that approach:</p> <blockquote> <p>Disadvantages</p> <ul> <li>Embedded content must be extracted and decoded before changes may be made, then re-encoded and re-embedded afterwards.</li> <li>Cookies are not supported.</li> <li>Information that is embedded more than once is redownloaded as part of the containing file, and thus does not benefit from the browser's cache.</li> <li>Browsers may limit URI lengths, creating an effective maximum data size. For example, URIs in previous versions of Opera had limits of 4kB, and 32kB for IE8 Beta 1[citation needed]</li> <li>Data is included as a simple stream, and many processing environments (such as web browsers) may not support using containers (such as multipart/alternative or message/rfc822) to provide greater complexity such as metadata, data compression, or content negotiation.</li> <li>Microsoft's Internet Explorer, through version 7 (some 70% of the market as of 2008 Q2), lacks support.</li> </ul> </blockquote> <p>The better Approach is to use a separate "Image.aspx" Page which takes and outputs your MemoryStream, kinda like I did in my Photo Album software that i've created when I started learning ASP.net:</p> <p><a href="http://souvenance.svn.sourceforge.net/viewvc/souvenance/trunk/Souvenance.Web/Image.aspx.cs?revision=100&amp;view=markup" rel="nofollow noreferrer">(Don't laugh, that was my first attempt at ASP.net :-)</a></p> <p>Edit: Agreed on ASHX, the code above is just to show one sample implementation. When I come around to update the Photo Album, it will use ASHX for that.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload