<asp:FileUpload ID="FileUpload1" runat="server" />我用的是控件。。
     后台代码是
if (Page.IsValid)
        {
            string savePath = @"../UploadFiles/";
            string savePath1 = @"../UploadFiles/smaill/";
            string fileName = Server.HtmlEncode(FileUpload1.FileName);
            string extension = System.IO.Path.GetExtension(fileName);
            string ImageName = null;
            if ((extension == ".jpg") | (extension == ".gif"))
            {
                ImageName = DateTime.Now.ToString("yyyyMMddhhmmssfff") + extension;
                savePath += ImageName;
                savePath1 += ImageName;
                savePath = Server.MapPath(savePath);
                savePath1 = Server.MapPath(savePath1);
                FileUpload1.SaveAs(savePath);
                //生成小图
                ImageClass.ImageClass imageClass = new ImageClass.ImageClass();
                imageClass.ShowThumbnail(savePath, savePath1,200,153);
            }
            else
            {
                Response.Write("<script>alert('文件上传格式错误');history.back(1);</script>");
                Response.End();
            }在网上找都是JS里的。。我想请各位指教一下我这段代码改如何修改。。才能有该功能