Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > BinaryImage > Set DataValue from Code-behind?

Answered Set DataValue from Code-behind?

Feed from this thread
  • Rakesh avatar

    Posted on Nov 1, 2011 (permalink)

    I have a dataset ds which contains Image which i want to display , look at the code below

    int uid = int.Parse(Session["UserId"].ToString());
    ds = new DataSet();
    string urprofile = "SELECT * FROM [Mimage] WHERE UID=" + uid + "";
    ds = dbClass.ReturnDS(urprofile);
    var image = ds.Tables[0].Rows[0]["Image"];
    Thumbnail.DataValue =(byte[])image;
    However this throws an error which i am attaching ...
    Help..??
    Attached files

    Reply

  • Answer Tsvetina Tsvetina admin's avatar

    Posted on Nov 2, 2011 (permalink)

    Hi Rakesh,

    As long as you pass the RadBinaryImage control a valid byte array, it will display it. I am attaching a sample project showing how the control is populated by reading a binary image from the database. Can you replicate the same issue inside it, with the sample Telerik database? 

    All the best,
    Tsvetina
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > BinaryImage > Set DataValue from Code-behind?