using System.IO;
if(File.Exists(Server.MapPath(路径)))//返回BOOL值
{
}
//下面是怡然居网站中的代码xsfyxx.aspx184行
string strpicsw="uploadpic/"+lbno.Text+"a.jpg";
string strpichx="uploadpic/"+lbno.Text+"a.jpg";
if(File.Exists(Server.MapPath(strpicsw))!=false || File.Exists(Server.MapPath(strpichx))!=false)
{
if(File.Exists(Server.MapPath(strpicsw)))
{
Label1.Text="<a href='uploadpic/"+lbno.Text+"a.jpg' target='_blank'>查看实物图</a>";
}
if(File.Exists(Server.MapPath(strpichx)))
{
Label2.Text="<a href='uploadpic/"+lbno.Text+"b.jpg' target='_blank'>查看户型图</a>";
}
}