Link to home
Create AccountLog in
Avatar of Lorna70
Lorna70

asked on

Dynamically assigning FB og tags - missing namespace??

I have the following code:


    private void loadtagTagsForFacebook()
    {
        tag = new Htmltag();
        tag.Attributes.Add("name", "og:url");
        tag.Attributes.Add("content", Request.Url.ToString());
        Page.Header.Controls.Add(tag);
   }

It doesn't work as I get:

'The type or namespace name 'Html tag' could not be found...'

What namespace do I need to use (e.g using xxxx;)??

I have added <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" id="Htmltag" runat="server"> to my html code.
ASKER CERTIFIED SOLUTION
Avatar of Meir Rivkin
Meir Rivkin
Flag of Israel image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.