Hi Francois,
As for the problem you mentioned, it is a known behavior of the vs.net's
HTML EDITOR, it'll popup warning when there is nesting quotes. And here are
some means to work through it:
1. Using the ' at the top level and using " in the nested expressions.
For example:
<a href='javascript
:popup("ShowPhoto.aspx?Id=<%#
DataBinder.Eval(Container.DataItem,"name") %>");'><img border="0" src='#'>
</a>
2. Also, since we can use serverside language(VB.NET or c#) to generate
the expression, the System.Convert.ToChar(int32) may help us to output the
quote mark in page template. For exampe:
<a href='<%# "javascript
:popup(" + Convert.ToChar(34) +
"ShowPhoto.aspx?Id=" + DataBinder.Eval(Container.DataItem,"name") +
Convert.ToChar(34) + ");" %>'>
<img border="0" src="#"></a>
BTW, if you're using C# , you can simplely using the \" to represent
string in expression, such as :
<div onclick='<%# "alert(\"" + DataBinder.Eval(....) + "\");" %>' ...>
Hope helps. If you have any other questions or ideas, please feel free to
post here. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)