Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi all I have an instance where i need to set the title attribute of an image with a page value in a usercontrol macro i.e.
<img src="blah.jpg" title="<umbraco:item field="imageTitleBlah" runat="server"/>"/>
should i just pass it in to the user control macro as a property or is there a better way of doing it in the usercontrols cs file?
Hi,
you can set this from codebehind. Access the node through umbraco.presentation.nodeFactory.Node.GetCurrent() - Change the image to an asp.net image and set the title attribute using the GetProperty method on the node.
Cheers,Harald
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Equivalent of umbraco:Item in cs
Hi all I have an instance where i need to set the title attribute of an image with a page value in a usercontrol macro i.e.
should i just pass it in to the user control macro as a property or is there a better way of doing it in the usercontrols cs file?
Hi,
you can set this from codebehind. Access the node through umbraco.presentation.nodeFactory.Node.GetCurrent() - Change the image to an asp.net image and set the title attribute using the GetProperty method on the node.
Cheers,
Harald
is working on a reply...