Microsoft Content Management Server - content of htmlplaceholder displaying on another posting

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > June 2005 > content of htmlplaceholder displaying on another posting





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author content of htmlplaceholder displaying on another posting
Dariusz Tomon

2005-06-30, 7:48 am

Hi

My problem is like this:

I have got a htmlplaceholder (Telerik RadEditorPlaceHolderControl) on first
posting. I insert a macromedia flash here. It's done animation is displaying
properly. Then I want to display contenet of the placeholder from posting nr
one in the posting number two.
I do it by assigning html content to Label like follow:

cmsContext = CmsHttpContext.Current;
Searches searchObject = cmsContext.Searches;

Posting postingObject;
postingObject = searchObject.GetByPath("/Channels/idn/main1") as Posting;
HtmlPlaceholder zrodlo;
zrodlo = postingObject.Placeholders["banerglowny"] as HtmlPlaceholder;

Label1.Text = Server.HtmlEncode(zrodlo.Html);

Instead of flash banner I get the text on the page:

~LT~embed pluginspage="http://www.macromedia.com/go/getflashplayer"
align="baseline"
src="/NR/rdonlyres/5BC5815F-2403-4BFE-8BC4-5E71728FF85A/0/zz_pepsi.swf"
width="750" height="100" type="application/x-shockwave-flash" bgcolor=""
salign="LT" quality="high" menu="false" loop="true"~GT~ ~LT~/embed~GT~

How can I get html code so that I can view my flash banner?\

regards

D.T.



Stefan [MSFT]

2005-06-30, 7:48 am

Hi Dariusz,

to allow flash content to be saved the content needs to be modified in a way
the MCMS does not recognize it as active content.
So it is escaped.

You need to unescape it.

To do this use the following command:

string unescapedcontent = content.replace("~GT~",">").replace("~LT~","<");

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"Dariusz Tomon" <d.tomon@mazars.pl> wrote in message
news:OmUDQ0UfFHA.3656@TK2MSFTNGP09.phx.gbl...
> Hi
>
> My problem is like this:
>
> I have got a htmlplaceholder (Telerik RadEditorPlaceHolderControl) on
> first posting. I insert a macromedia flash here. It's done animation is
> displaying properly. Then I want to display contenet of the placeholder
> from posting nr one in the posting number two.
> I do it by assigning html content to Label like follow:
>
> cmsContext = CmsHttpContext.Current;
> Searches searchObject = cmsContext.Searches;
>
> Posting postingObject;
> postingObject = searchObject.GetByPath("/Channels/idn/main1") as Posting;
> HtmlPlaceholder zrodlo;
> zrodlo = postingObject.Placeholders["banerglowny"] as HtmlPlaceholder;
>
> Label1.Text = Server.HtmlEncode(zrodlo.Html);
>
> Instead of flash banner I get the text on the page:
>
> ~LT~embed pluginspage="http://www.macromedia.com/go/getflashplayer"
> align="baseline"
> src="/NR/rdonlyres/5BC5815F-2403-4BFE-8BC4-5E71728FF85A/0/zz_pepsi.swf"
> width="750" height="100" type="application/x-shockwave-flash" bgcolor=""
> salign="LT" quality="high" menu="false" loop="true"~GT~ ~LT~/embed~GT~
>
> How can I get html code so that I can view my flash banner?\
>
> regards
>
> D.T.
>
>
>



Dariusz Tomon

2005-06-30, 7:48 am

Thanks a lot

Besides I had to add:

string unescaped = content.Replace(""",new string((Char)34, 1));

because " is also special character



regards

Darek


"Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
news:e7cZ4$UfFHA.2496@TK2MSFTNGP15.phx.gbl...
> Hi Dariusz,
>
> to allow flash content to be saved the content needs to be modified in a
> way the MCMS does not recognize it as active content.
> So it is escaped.
>
> You need to unescape it.
>
> To do this use the following command:
>
> string unescapedcontent = content.replace("~GT~",">").replace("~LT~","<");
>
> Cheers,
> Stefan
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
>
> New to MCMS?
> Check out this book: Building Websites Using MCMS:
> http://tinyurl.com/6zj44
> ----------------------
>
>
> "Dariusz Tomon" <d.tomon@mazars.pl> wrote in message
> news:OmUDQ0UfFHA.3656@TK2MSFTNGP09.phx.gbl...
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com