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

Strange behavior of HTML Place Holder Please help!

1 Answer 75 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
Shiv
Top achievements
Rank 1
Shiv asked on 12 May 2012, 03:01 PM
I'm implementing HTML place holder for the first time. I looked at the examples  and it looks straight forward. 
I'm getting the HTML from the radrichtextbox using html dataprovider. .I'm setting the
RadHtmlPlaceholder.HtmlSource= html provided by the radrichtextbox html data provider (this dint work)

But when I place a @"<html><b>test</> +html provided by the radrichtextbox+"</html> 


If i put this tags around the string stream it works fine.


When I copy paste the same text on browser and it does show fine. 

Here is my code snippet.

Any help would be appreciated. 

xaml:
<telerik:RadHtmlPlaceholder x:Name="RadHtmlPlaceholder" Margin="10" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" RespectSilverlightLayoutMeasure="True" />

code behind:
public string HtmlSource {get;set;}
 public EmailHtmlPreview(string source) //constructor source is passed down to this window 
        {
            InitializeComponent();
            this.HtmlSource = source;
            Loaded += new RoutedEventHandler(LayoutRoot_Loaded);
        }

        void LayoutRoot_Loaded(object sender, RoutedEventArgs e)
        {
            RadHtmlPlaceholder.HtmlSource = HtmlSource;  //binding to the property /* this dint                                                                                                                                             work*/
    /* but this worked*/
    RadHtmlPlaceholder.HtmlSource= @"<html><b>test</> +HtmlSource +"</html>   why ???

        }

     I want this to work without any hacks or tags around the actual dataEdit your post

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 17 May 2012, 06:15 AM
Hello Shiv,

 Could you please check out this post and let us know if it helps you ? Thank you in advance.

Regards,
Petar Mladenov
the Telerik team

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

Tags
HTMLPlaceHolder
Asked by
Shiv
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or