K
Keith G Hicks
I had the following on a page:
<asp:Image runat="server" ID="imgGradLarge" ImageUrl='<%# "ClassmatePics/" &
Eval("GradPhotoFileName") %>'></asp:Image>
The folder "ClassmatePics" was off my site's root. This was working fine.
Some people made recommendations to move folders like this (where users can
upload images) to the App_Data folder so I did that as follows:
C:\Inetpub\wwwroot\Website1\App_Data\ClassmatePics
Of cousre I changed all my code in the images to account for the change as
follows (sevearl ways shown below)
<asp:Image runat="server" ID="imgGradLarge" ImageUrl='<%#
"~/App_Data/ClassmatePics/" & Eval("GradPhotoFileName") %>'></asp:Image>
<asp:Image runat="server" ID="imgGradLarge" ImageUrl='<%#
"App_Data/ClassmatePics/" & Eval("GradPhotoFileName") %>'></asp:Image>
<asp:Image runat="server" ID="imgGradLarge" ImageUrl='<%#
"Website1/App_Data/ClassmatePics/" & Eval("GradPhotoFileName")
%>'></asp:Image>
<asp:Image runat="server" ID="imgGradLarge" ImageUrl='<%#
"/Website1/App_Data/ClassmatePics/" & Eval("GradPhotoFileName")
%>'></asp:Image>
None of the above work at all. No image shows up. The images are in the
folder they're supposed to be in. The folders have read privileges. I don't
get any errors. I just get blank images where before they showed up
correctly. The whole url path thing is goign to be the death of me. It
doesn't seem consistent. Not sure what to do here to get this right. Hope
someone can help.
Thanks,
Keith
<asp:Image runat="server" ID="imgGradLarge" ImageUrl='<%# "ClassmatePics/" &
Eval("GradPhotoFileName") %>'></asp:Image>
The folder "ClassmatePics" was off my site's root. This was working fine.
Some people made recommendations to move folders like this (where users can
upload images) to the App_Data folder so I did that as follows:
C:\Inetpub\wwwroot\Website1\App_Data\ClassmatePics
Of cousre I changed all my code in the images to account for the change as
follows (sevearl ways shown below)
<asp:Image runat="server" ID="imgGradLarge" ImageUrl='<%#
"~/App_Data/ClassmatePics/" & Eval("GradPhotoFileName") %>'></asp:Image>
<asp:Image runat="server" ID="imgGradLarge" ImageUrl='<%#
"App_Data/ClassmatePics/" & Eval("GradPhotoFileName") %>'></asp:Image>
<asp:Image runat="server" ID="imgGradLarge" ImageUrl='<%#
"Website1/App_Data/ClassmatePics/" & Eval("GradPhotoFileName")
%>'></asp:Image>
<asp:Image runat="server" ID="imgGradLarge" ImageUrl='<%#
"/Website1/App_Data/ClassmatePics/" & Eval("GradPhotoFileName")
%>'></asp:Image>
None of the above work at all. No image shows up. The images are in the
folder they're supposed to be in. The folders have read privileges. I don't
get any errors. I just get blank images where before they showed up
correctly. The whole url path thing is goign to be the death of me. It
doesn't seem consistent. Not sure what to do here to get this right. Hope
someone can help.
Thanks,
Keith