<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="eWebEditor_upload_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>文件上传</title>
<style type="text/css">
body, a, table, div, span, td, th, input, select{font:12px;}
body {padding:0px;margin:0px}
</style>
<link href="../dialog/dialog.css" rel="stylesheet" type="text/css" />
<script language="javascript">
function getSize()
{
	/*
	var file = document.getElementById("uploadfile").value.toLowerCase();
	
	
	if( file.indexOf("jpg") > 0 || file.indexOf("jpeg") > 0 || file.indexOf("gif") > 0 )
	{
		var img = new Image();
		img.src = document.getElementById("uploadfile").value;
		
		document.getElementById("width").value = img.width;
		document.getElementById("height").value = img.height;
	}
	else
	{
		document.getElementById("width").style.display = "none";
		document.getElementById("height").style.display = "none";

		document.getElementById("width").value = "";
		document.getElementById("height").value = "";
	}
	*/
}

function checkUpload()
{
	if( document.myform.uploadfile.value == "" )
	{
		alert("请选择上传文件。");
		return false;
	}
	
	return true;
}
</script>
</head>
<body>
    <form id="myform" runat="server"  >
    <asp:Label ID="lblinfo" runat="server">
        <asp:FileUpload ID="uploadfile" runat="server" Width="50%" CssClass="addfile" />&nbsp;
		<asp:CheckBox ID="auto" Text="自动压缩" Checked="false" Visible="false" runat="server" />&nbsp;
		<asp:TextBox ID="width" Text="640" runat="server" Visible="false" style="width:30px" />&nbsp;<asp:TextBox ID="height" Text="400" runat="server" Visible="false" style="width:30px" />&nbsp;<asp:Button ID="ButUpload" runat="server" OnClick="Button1_Click" Text="上传" onclientclick="parent.document.all('divProcessing').style.display='';" style="height:20px;" />
    </asp:Label>
    </form>
</body>
</html>