判断上传的类型不就可以了
http://dotnet.aspx.cc/ShowDetail.aspx?id=2A5DD7C6-A45A-48AB-A2E8-342A29F17506
上传倒数据库

解决方案 »

  1.   

    http://community.csdn.net/Expert/topic/3737/3737622.xml?temp=.5879938
    是往Access里写的例子!
      

  2.   

    1SQL Server存储图像数据的策略与方法http://www.yesky.com/20030113/1648152_1.shtml
      

  3.   

    偶提供一个上传到目录的:
    string savePath = Server.MapPath("../commonalitypic/");
    string filenames = System.IO.Path.GetFileName(File1.PostedFile.FileName);
    string filePath = @"E:\code\cardinfo\commonalitypic\"+filenames;
    string thumbPath1 = userpath + filenames;
    System.Drawing.Image coverImg = System.Drawing.Image.FromFile(filePath);
    string imgheight = coverImg.Height.ToString();
    string imgwidth = coverImg.Width.ToString();
    if ( System.Convert.ToInt32(imgwidth)>System.Convert.ToInt32(imgheight))
    {
    System.Drawing.Image thumbImg = coverImg.GetThumbnailImage(134,90, null, IntPtr.Zero);
    thumbImg.Save(thumbPath1, System.Drawing.Imaging.ImageFormat.Jpeg);
    thumbImg.Dispose();
    }
    else
    {
    System.Drawing.Image thumbImg = coverImg.GetThumbnailImage(103,113, null, IntPtr.Zero);
    thumbImg.Save(thumbPath1, System.Drawing.Imaging.ImageFormat.Jpeg);
    thumbImg.Dispose();
    }
    coverImg.Dispose();
      

  4.   

    这个csdn里面很多
    搜索一下N多