Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Handling Quotes inside of double quotes inside of quotes 1

Status
Not open for further replies.

suicidaltendencies

Programmer
Jan 28, 2004
58
US
text=&quot;<a href=<%# ' + DataBinder.Eval(Container.DataItem, &quot;City&quot;)%> ......


Here is an example. I have this in a buttoncolumn with in a datagrid. I don't know if that is important.

What I'm trying to accomplish is putting a <a> around a <img> in a buttoncolumn text attribute. As you can tell there is some major nesting going on. Is there a easy way of handling this?

Thanks,
Harold
 
I think, it would be a little simplier to use a combination of <a> and <img> html tags inside of a TemplateColumn, instead of a ButtonColumn:
Code:
<asp:TemplateColumn>
 <ItemTemplate>
  <a href='<%# &quot;[URL unfurl="true"]http://www.yahoo.com?id=&quot;[/URL] + DataBinder.Eval(Container.DataItem, &quot;City&quot;) %>'><img src=&quot;/images/myImage.gif&quot; border=0></a>
 </ItemTemplate>
</asp:TemplateColumn>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top