J
Jeff
Hey
ASP.NET 2.0
Below is the code I have trouble with. I've placed some pictures in the
~/Network/Images/Fullsize/ folder in my project. The problem is that File
Exist always return false (it execute the ELSE block, despite the fact that
~/Network/Images/Fullsize/" + Profile.UserName + ".png" exist)
if (File.Exists("~/Network/Images/Fullsize/" + Profile.UserName + ".png"))
{
imgProfile.ImageUrl = "~/Network/Images/Fullsize/" + Profile.UserName +
".png";
}
else
{
imgProfile.ImageUrl = "~/Network/Images/Fullsize/nopicture.png";
}
What am I doing wrong here?
Jeff
ASP.NET 2.0
Below is the code I have trouble with. I've placed some pictures in the
~/Network/Images/Fullsize/ folder in my project. The problem is that File
Exist always return false (it execute the ELSE block, despite the fact that
~/Network/Images/Fullsize/" + Profile.UserName + ".png" exist)
if (File.Exists("~/Network/Images/Fullsize/" + Profile.UserName + ".png"))
{
imgProfile.ImageUrl = "~/Network/Images/Fullsize/" + Profile.UserName +
".png";
}
else
{
imgProfile.ImageUrl = "~/Network/Images/Fullsize/nopicture.png";
}
What am I doing wrong here?
Jeff