Hi Peter,
Thanks so much for the help. Realizing I can go in and do this with C# is very helpful (though I am new to that as well)
Based on your code I managed to get the following working:
bool fileExists = false;
string path = "";
protected override void OnInit(EventArgs e)
{
if (String.IsNullOrEmpty(Eval("byline").ToString()) == false) {
path = "/App_Themes/style/shared/images/reportermugs/"+ Eval("byline") + ".png";
if (System.IO.File.Exists(Server.MapPath("~" + path))) {
fileExists = true;
}
}
else
{
Console.WriteLine("Null or empty");
}
}
Your code threw some errors so I had to tweak it a bit. And it's not the most elegant with that extra else in there but it kept throwing "no NullorFalse option declared" until I did.
I'm not real clear on what some parts of this line mean:
protected override void OnInit(EventArgs e)
Or the details of exactly how this maps:
System.IO.File.Exists(Server.MapPath()
As I had to remove.System.Web before it would work
So I have a lot of learning to do.
Thank you very much for the help.
UPDATE: Actually I was able to remove that else condition when I changed the IsNullOrEmpty == false. that cleared the error.