access/change title/meta tags through custom control
Hello,
is there any possibility to change the head tags items through a custom control? We use umbraco 4.0.3 and our own custom control to show things from database. Now I wanted to dynamically set the title tag and meta tags to do some SEO! I added runat=server to the head tag and also ids for the different head items, like title etc, but the content is always overwritten by Umbraco!
I search the forum and the net, but I can't figure out the right solution. Maybe I searched for the wrong things!
Thanks in advanced for all answers and the good work you do in the forum!
Thanks for the quick response Chris, but your solution don't work! Nothing is changed in the head, no title and no meta tags.
My control is no usercontrol! I use a custom server control with only an assembly file (.dll) in the bin folder and no .ascx file! I think the problem is the way umbraco or asp.net integrates the control in the page. Correct me if I'm wrong.
Maybe I have to change to an usercontrol to do the things, because this functions as you described!
access/change title/meta tags through custom control
Hello,
is there any possibility to change the head tags items through a custom control? We use umbraco 4.0.3 and our own custom control to show things from database. Now I wanted to dynamically set the title tag and meta tags to do some SEO! I added runat=server to the head tag and also ids for the different head items, like title etc, but the content is always overwritten by Umbraco!
I search the forum and the net, but I can't figure out the right solution. Maybe I searched for the wrong things!
Thanks in advanced for all answers and the good work you do in the forum!
Greets Markus
Welcome to the forums :)
In your head tag add a your normal meta tags with an id and runat='server'.
In the codebehind of the the usercontrol:
-Chris
Thanks for the quick response Chris, but your solution don't work! Nothing is changed in the head, no title and no meta tags.
My control is no usercontrol! I use a custom server control with only an assembly file (.dll) in the bin folder and no .ascx file! I think the problem is the way umbraco or asp.net integrates the control in the page. Correct me if I'm wrong.
Maybe I have to change to an usercontrol to do the things, because this functions as you described!
Markus
is working on a reply...