Image (From library) user control for master page
Hi, I'm wanting to display an image on a master page / user control and I want to reference by the library Image Id. I've found a "ImageControl" in the Telerik.Sitefinity.Web.UI.PublicControls namespace which seems to fit the bill but whenever I reference controls from this library the whole intellisense stops working and I can't get the parameters for this user control.
I also can't seem to find any documentation on working with controls directly on master pages / controls which is useful.
I've also tried importing the toolbox for this library and it does bring all the controls in but when I drop it on the page it tells me it doesn't recognise the tag prefix.
I would build all this in master pages in the admin area but I don't want 20 templates all with their own logo dropped onto them and equally any navigation etc so I'm putting these into Header and Footer controls.
I've read somewhere that you have to create custom controls to do what I'm wanting but that seems overkill if you already have the controls created which are rendered from the CMS?
Hi Chris,
I have replied in the ticket you have opened related to this. I am pasting the reply here for your convenience:
I have just tested this and managed to add the ImageControl to the master page. In order to register the control please note to add the following namespace in the master page:
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.PublicControls" TagPrefix="sf" %>
<
sf:ImageControl
id
=
"imageControl1"
ImageId
=
"D57BB09D-3061-65BF-89A0-FF0000058207"
runat
=
"server"
/>
ImageControl image =
new
ImageControl();
var imageId = image.ImageId;
Thanks, the intellisense was what was throwing me. I just wanted to make sure there wasn't something I could to to resolve it.
I've used the object explorer to get the properties so I'll just work with that instead
Thanks