Custom Property Values not in Meta tags
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > Custom Property Values not in Meta tags




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Custom Property Values not in Meta tags  
Nancy Meyers


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-26-04 08: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.






[ Post a follow-up to this message ]



    Re: Custom Property Values not in Meta tags  
Stefan [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-26-04 11: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.
>







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 02:55 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register