images on gridview
-
Pals, i have problems to show images on gridview control. i have the image url saved onto a table columns in Sql server express 2005. ex C:\Inetpub\wwwroot\intranet\imagenes_usuarios\a\bio.jpg, the column name is urlimage i created an ImageField inside the gridview, its already set the dataurlimagefield value to urlimage, and the image dont show up. I lost something, refresh event, or something...:confused:
keep Learning and you never will be out of date...
-
Pals, i have problems to show images on gridview control. i have the image url saved onto a table columns in Sql server express 2005. ex C:\Inetpub\wwwroot\intranet\imagenes_usuarios\a\bio.jpg, the column name is urlimage i created an ImageField inside the gridview, its already set the dataurlimagefield value to urlimage, and the image dont show up. I lost something, refresh event, or something...:confused:
keep Learning and you never will be out of date...
The obvious question is, are you sure the path is correct? Is it being correctly rendered in the urlimage property (path not image itself, of course)?
only two letters away from being an asset
-
The obvious question is, are you sure the path is correct? Is it being correctly rendered in the urlimage property (path not image itself, of course)?
only two letters away from being an asset
I follow your suggest and i found that maybe gridview image colunm doesnt work with absolute url image, what do you think, ¿im right?? an Friend Britney :)
keep Learning and you never will be out of date...
-
I follow your suggest and i found that maybe gridview image colunm doesnt work with absolute url image, what do you think, ¿im right?? an Friend Britney :)
keep Learning and you never will be out of date...
I haven't tried it with absolute paths but I have with relative paths and it seems fine.
only two letters away from being an asset
-
Pals, i have problems to show images on gridview control. i have the image url saved onto a table columns in Sql server express 2005. ex C:\Inetpub\wwwroot\intranet\imagenes_usuarios\a\bio.jpg, the column name is urlimage i created an ImageField inside the gridview, its already set the dataurlimagefield value to urlimage, and the image dont show up. I lost something, refresh event, or something...:confused:
keep Learning and you never will be out of date...
Absolute paths like this will never work on ASP.NET controls because the browser on the user PC will not understand where is the C drive on the server. You must convert this path to a relative path. May be by trimming the url string to remove the first characters until the page folder. like: <%# DataBinder.Eval(Container.DataItem, "urlimage").ToString().Substring(28) %>
The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.