Adam,
You should be able to use double quotes instead of single quotes around the
{0} but you'll have to double up the double quotes like this: ""{0}""
Regards,
S. Justin Gengo
Free code and component libraries at:
http://www.aboutfortunate.com
> Hi Nathan,
>
> It does not work, still same problem..
> the single quotes in '{0}' causes the error "The server tag is not well
> formed" error ,
> if i remove the single quotes no error occurred but function gets error...
What is the complete code for the tag in the *.aspx file? When I use things
the way I showed you, even with single quotes, they work perfectly. What is
the complete exact text of the error message? I am wondering if it is
possible that the error is referring to a different server tag.

Signature
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/
> Hi Nathan,
>
> It does not work, still same problem..
> the single quotes in '{0}' causes the error "The server tag is not well
> formed" error ,
> if i remove the single quotes no error occurred but function gets error...
Jose A. Fernandez - 10 Feb 2008 17:59 GMT
Hello Adam
With a htmlcontrol img (tag <img .. />
<asp:FormView ID="FormView1" runat="server"...
<ItemTemplate>...
<img src="/images/image1.jpg" onmouseover="<%#
String.Concat("ChangePicture('", Eval("BIG_PICTURE_PATH"), "');") %>" /
the render is
<img src="/images/image1.jpg" onmouseover="ChangePicture('/
images/OtherImage.jpg');" />
But, if you have webcontrol Image...
<asp:FormView ID="FormView1" runat="server"...
<ItemTemplate>...
<asp:Image runat="server" ID="imgExample" ImageUrl="~/
images/image1.jpg" />
and into codebehind, in ItemCreated method
Protected Sub FormView1_ItemCreated(ByVal sender As Object, ByVal
e As System.EventArgs) Handles FormView1.ItemCreated
Dim pathImagen As String = CType(FormView1.DataItem,
Data.DataRowView).Item("CategoryID").ToString
Dim imgExample As Image =
CType(FormView1.FindControl("imgExample"), Image)
imgExample.Attributes.Add("onmouseover", "ChangePicture('" &
pathImagen & "');")
End Sub
the render id
<img id="ctl00_contenidoCentral_FormView1_imgExample"
onmouseover="ChangePicture('/images/OtherImage.jpg');" src="../images/
image1.jpg" ...
Links
--------------
WebControl.Attributes Property
Gets the collection of arbitrary attributes (for rendering only) that
do not correspond to properties on the control.
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.webcontrol.at
tributes(VS.80).aspx
______________________
Jose A. Fernandez
blog: http://geeks.ms/blogs/fernandezja
> What is the complete code for the tag in the *.aspx file? When I use things
> the way I showed you, even with single quotes, they work perfectly. What is
[quoted text clipped - 10 lines]
> > formed" error ,
> > if i remove the single quotes no error occurred but function gets error...