I'm trying to do a String.Replace inside my asp:image tag (nested in a Repeater) in order to change an apostrophe to an html friendly apostrophe
<asp:Image ID="Image1"
runat="server"
ImageUrl='<%# String.Format("~/images/products/{0}", XPath("image"))%>'
Visible='<%# CheckEmpty(XPath("image")) %>'
AlternateText='<%# XPath("@name")%>'
ToolTip='<%# XPath("@name").Replace("'", "'")%>' />
The "ToolTip" is giving me difficulties. The error says "not well formed" but I know it's something to do with the format but.