<%@ page language="C#" autoeventwireup="true" inherits="admin2_sp1u2, GJ_YM" enableviewstatemac="false" enableEventValidation="false" %>
<head><title>无标题页</title>
<script type="text/javascript" language="javascript">
var CanUploadExt ="|.jpg|.gif|.bmp|.png|.jpeg|";
function CheckExt(){
var oFile = document.getElementById('<%=FileUpload1.ClientID %>');var ext = oFile.value.substr(oFile.value.lastIndexOf("."));if(ext.length < 1){alert("请选择要上传的文件。");return false;
}else{ext = ext.toLowerCase();if(CanUploadExt.indexOf("|" + ext + "|") == -1){alert("请选择类似如下后缀名的文件:\r\n" + CanUploadExt);return false;}}return true;}</script>
</head><link href="css/yb.css" rel="stylesheet" type="text/css">
<body style="margin-top:50px;padding:0px; text-align:center;">
<form id="form1" runat="server">
<asp:FileUpload ID="FileUpload1" runat="server" style="height:25px; width:320px;" /> 
<asp:Button ID="Button1" runat="server" Text="上传图片" OnClick="Button1_Click" OnClientClick="return CheckExt()" />
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
</form>
</body>