Microsoft Content Management Server - Custom Property Values not in Meta tags

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > April 2004 > Custom Property Values not in Meta tags





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 Custom Property Values not in Meta tags
Nancy Meyers

2004-04-26, 3:36 pm

Hi - Does anyone have an idea of what I am doing wrong? I
have a posting with a couple of custom properties that
have values. In my Header control I have code like this:

CustomPropertyCollection
objCustomPropertyCol =
CmsHttpContext.Current.Channel.CustomProperties;
foreach(CustomProperty objCustomProperty
in objCustomPropertyCol)
{
%>
<meta content="<%=Server.HtmlEncode
(objCustomProperty.Value)%>" name="<%=Server.HtmlEncode
(objCustomProperty.Name)%>">
<%
}

When I navigate to the page and View Source, I see the
meta tags, but there are no values.

Also, when I add a Trace to the page, I get no values in
the trace. **However**, once I click on 'Switch to Edit'
mode, the values show up. Are custom properties
unavailable in regular viewing mode?

Thanks.

Stefan [MSFT]

2004-04-26, 6:43 pm

Hi Nancy,

I would use a user control rather than such inline code.

Cheers,
Stefan.

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


"Nancy Meyers" <anonymous@discussions.microsoft.com> wrote in message
news:477601c42bc3$e3eddc10$a301280a@phx.gbl...
> Hi - Does anyone have an idea of what I am doing wrong? I
> have a posting with a couple of custom properties that
> have values. In my Header control I have code like this:
>
> CustomPropertyCollection
> objCustomPropertyCol =
> CmsHttpContext.Current.Channel.CustomProperties;
> foreach(CustomProperty objCustomProperty
> in objCustomPropertyCol)
> {
> %>
> <meta content="<%=Server.HtmlEncode
> (objCustomProperty.Value)%>" name="<%=Server.HtmlEncode
> (objCustomProperty.Name)%>">
> <%
> }
>
> When I navigate to the page and View Source, I see the
> meta tags, but there are no values.
>
> Also, when I add a Trace to the page, I get no values in
> the trace. **However**, once I click on 'Switch to Edit'
> mode, the values show up. Are custom properties
> unavailable in regular viewing mode?
>
> Thanks.
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com