This is a migrated thread and some comments may be shown as answers.

Image not displaying in RadHtmlPlaceholder

4 Answers 92 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
Mahendra
Top achievements
Rank 1
Mahendra asked on 20 Sep 2011, 08:26 AM
Hello,

 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

Thanks,
Mahendra

 

 

4 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 22 Sep 2011, 03:17 PM
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 >>

0
Mahendra
Top achievements
Rank 1
answered on 23 Sep 2011, 07:22 AM
Hello,

 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.

Mahendra
0
Asif Hossain
Top achievements
Rank 1
answered on 02 Nov 2012, 11:10 AM
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.

Regards,
Shantu
0
Hristo
Telerik team
answered on 06 Nov 2012, 02:57 PM
Hi,

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

Greetings,
Hristo
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
HTMLPlaceHolder
Asked by
Mahendra
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Mahendra
Top achievements
Rank 1
Asif Hossain
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or