Problem with Ext:Image property Html

  1. #1

    Problem with Ext:Image property Html

    Hi,

    I save a Image in my database

    Stream fs = fuAddImg.PostedFile.InputStream;
    BinaryReader reader = new BinaryReader(fs);
    documento = reader.ReadBytes((Int32)fs.Length);
    
    String pextension = Path.GetExtension(fuAddImg.PostedFile.FileName);
        if (pextension.Equals(".gif") || pextension.Equals(".jpg") || pextension.Equals(".png"))
            {
                   string url = "data:image/jpg;base64," + Convert.ToBase64String(documento);  <--- this code is saved in the DB
                   wrapped.Html = "<img id='ImagenArticulo' border='1px' src='" + url + "' >";
    and yhen a Im trying to see a Image

    txtCom.Text = o_cat_articulo.com_articulo;
               
    
                hdImagen.Text = o_cat_articulo.img_articulo.Trim();
    
                string Url = "<img id='ImagenArticulo' border='1px' src='" + hdImagen.Text + "' >";  <--- I interseted on run program and can see a Imagen
    
                wrapped.Html = "<img id='ImagenArticulo' border='1px' src='' >"; <<-- then a set the same code in the Ext:Image control Id wrapped
    and in the explorer the code is
    Click image for larger version. 

Name:	error imagen.PNG 
Views:	54 
Size:	10.3 KB 
ID:	24196

    but no image is showed why??, is necessary more code??
    I don't have a lot experience with VS and ext.net

    thanks
    Last edited by Daniil; Sep 07, 2015 at 12:25 PM. Reason: Please use [CODE] tags
  2. #2
    Hi @jogave,

    Welcome to the Ext.NET forums!

    I don't quite have any ideas what is going on. At least, I don't see how all is configured on your side.

    Could you, please, provide a full test case that I could copy, paste, run and reproduce the issue? For a test case please get rid of the dependency on a database and save an image somewhere else, for example, in Session.

Similar Threads

  1. [CLOSED] Image paste problem on html editor
    By EsraKilical in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Feb 20, 2014, 7:50 AM
  2. Replies: 0
    Last Post: Jul 31, 2013, 3:23 AM
  3. [CLOSED] ext:ComboBox ListItem with html image tag
    By supera in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 02, 2012, 12:58 PM
  4. Replies: 2
    Last Post: Nov 03, 2011, 5:24 PM
  5. [CLOSED] how to set panel html property as javascript property
    By kenanhancer in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Jan 05, 2011, 6:45 PM

Tags for this Thread

Posting Permissions