<%@ Page Language="C#" %>
<%@ Import Namespace="System.IO"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Directory.Exists(Server.MapPath("~/upload/")))
            Label1.Text = "Yes,在当前文件夹中有upload子文件夹";
        else
            Label1.Text = "No,,在当前文件夹中没有upload子文件夹";
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>测试指定文件夹是否存在</title>
</head>
<body>
    <form id="form1" runat="server">&nbsp;
<div>
<asp:Label ID="Label1" runat="server" Text="Label" Width="156px"></asp:Label>
        </div>
    </form>
</body>
</html>
