Image not displaying in RadHtmlPlaceholder

5 posts, 0 answers
  1. Mahendra
    Mahendra avatar
    24 posts
    Member since:
    Apr 2011

    Posted 20 Sep 2011 Link to this post


     I have Html page  myPage.html. In that page there is css style sheet and img tag like below


    link href="style.css" rel="stylesheet" type="text/css" />

     and image like below

    <img src="Picture2.png" width="406" height="306"/>

    When I browse my html page it displays fine.

    I have Two projects one is for Html pages there I placed Html pages, Css styles and  required Images
     And other is for Xaml pages. In my Xaml page I am calling Html Pages from html project.
    To display Htmp page I placed RadHtmlPlaceholder in xaml and code like below

    StreamReader streamReader;


    streamReader = new StreamReader(Application.GetResourceStream(new Uri("/HtmlPagePrj;component/HtmlPages/myPage.html", UriKind.Relative)).Stream);


    htmlPlaceholderCompanyWeb.HtmlSource = streamReader.ReadToEnd();
     By this I can see all text in html but I am not able to see Image as well as styles.
    So what could be the reason and please give solution how i can see images




  2. Kiril Stanoev
    Kiril Stanoev avatar
    1512 posts

    Posted 22 Sep 2011 Link to this post

    Hi Mahendra,

    Thank you for contacting us. The image should be part of the Web project and not the Silverlight project. Please take a look at the attached project and let me know if it helps. I'd be glad to further assist you.

    Kind regards,
    Kiril Stanoev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Mahendra
    Mahendra avatar
    24 posts
    Member since:
    Apr 2011

    Posted 23 Sep 2011 Link to this post


     I already did with Images placing in web project but I was looking if it is possible if placed in same xaml project.

    Thanks for reply.

  4. Asif Hossain
    Asif Hossain avatar
    4 posts
    Member since:
    Nov 2012

    Posted 02 Nov 2012 Link to this post

    Hi Kiril ,
    I need to load css and JQuery contents in radHtmlPlaceHolder control using html source strings as the source. The idea is I am generating html contents and I want to link my own css, jquery file ( to pop up tooltip when mouse over in any link with some cool style and information).
    So where and how can I link my css + jquery source file, so that from silverlight application (out of browser) I can load radHtmlPlaceholder control with my html source + css and jquery file link.

    it works when I add the css and javascript code in the html source but I want to give have it separate and want to link it with script src="myJavaScript.Js".

    Your attachment does not work for me, For example, using your attached solution, If i make the xaml project as startup project (out of browser) instead of asp .net web project, then i cant see the images, so images are not loaded.

  5. Hristo
    Hristo avatar
    352 posts

    Posted 06 Nov 2012 Link to this post


    I've already posted an answer to your question in your other post.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top