<%#Container.DataItem(" ")%> problem
-
Hi all, in my html-code I have the following line: This line works fine, BUT than I have to put my images in the root of my project. In my situation all the images are in the /images-directory How do I have to modify my ImageUrl-tag to get this right? I already tried:
')" />
but he didn't find the image, I only got a box with the red cross does anybody can help me? Thank you very much respect 2B respected -
Hi all, in my html-code I have the following line: This line works fine, BUT than I have to put my images in the root of my project. In my situation all the images are in the /images-directory How do I have to modify my ImageUrl-tag to get this right? I already tried:
')" />
but he didn't find the image, I only got a box with the red cross does anybody can help me? Thank you very much respect 2B respectedHi there, You simply edit the data binding expression like this:
ImageUrl='<%# DataBinder.Eval(Container.DataItem, "picname", "images/{0}")%>'
The
Server.MapPath()
method returns the physical path that corresponds to a virtual url, so it does not help here. For more information, see Data Binding Expression Syntax [^] -
Hi all, in my html-code I have the following line: This line works fine, BUT than I have to put my images in the root of my project. In my situation all the images are in the /images-directory How do I have to modify my ImageUrl-tag to get this right? I already tried:
')" />
but he didn't find the image, I only got a box with the red cross does anybody can help me? Thank you very much respect 2B respectedHi Friend use this code hope u will solve ur problem ImageUrl='images/<%# Container.DataItem("picname") %>' Jitendra J. A. Patel
-
Hi all, in my html-code I have the following line: This line works fine, BUT than I have to put my images in the root of my project. In my situation all the images are in the /images-directory How do I have to modify my ImageUrl-tag to get this right? I already tried:
')" />
but he didn't find the image, I only got a box with the red cross does anybody can help me? Thank you very much respect 2B respected -
Hi all, in my html-code I have the following line: This line works fine, BUT than I have to put my images in the root of my project. In my situation all the images are in the /images-directory How do I have to modify my ImageUrl-tag to get this right? I already tried:
')" />
but he didn't find the image, I only got a box with the red cross does anybody can help me? Thank you very much respect 2B respected