请问C#使用upload up = new upload();上传图片,需要什么其它组件吗?如何控制上传图片的大小?

解决方案 »

  1.   

    我的函数是这样的
     protected void Button1_Click(object sender, EventArgs e)
        {
            string pic, res;
            upload up = new upload();
            res = up.Up(file1, "newpic/");
            Response.Write(up.Resup[Convert.ToInt32(res)]);
            TextBox_pic.Text = up.s;
        } 现在只能上传10K  
      

  2.   

    webconfing 
     <httpRuntime executionTimeout="90" maxRequestLength="20480"/>
    executionTimeout 超时的时间
    maxRequestLength 文件的大小好像最大不能超过10兆
      

  3.   

    protected void Button1_Click(object sender, EventArgs e) 
        { 
            string pic, res; 
            upload up = new upload(); 
            res = up.Up(file1, "newpic/"); 
            Response.Write(up.Resup[Convert.ToInt32(res)]); 
            TextBox_pic.Text = up.s; 
        } 
    其是Response.Write(up.Resup[Convert.ToInt32(res)]); 是什么意思?