当前位置:编程学习 > C#/ASP.NET >>

求大能帮忙调错


using System;
using System.Web;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

namespace ZX_WYZJ.Admin
{
    public partial class uploaduserphoto : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.IsPostBack) return;
            if (!string.IsNullOrEmpty(Request.QueryString["Picurl"]))
            {
                ImageDrag.ImageUrl = Request.QueryString["Picurl"];
                ImageIcon.ImageUrl = Request.QueryString["Picurl"];
                Page.ClientScript.RegisterStartupScript(typeof(uploaduserphoto), "step2", "<script type='text/javascript'>Step2();</script>");
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(typeof(uploaduserphoto), "step1", "<script type='text/javascript'>Step1();</script>");
            }
        }
        private const string savepath = "../images/User/UserHeadImage" + "/";
        protected void btnUpload_Click(object sender, EventArgs e)
        {
            if (fuPhoto.PostedFile != null && fuPhoto.PostedFile.ContentLength > 0)
            {

                string ext = System.IO.Path.GetExtension(fuPhoto.PostedFile.FileName).ToLower();
                if (ext != ".jpg" && ext != ".jepg" && ext != ".bmp" && ext != ".gif")
                {
                    return;
                }
                string filename = "xuanye_" + DateTime.Now.ToString("yyyyMMddHHmmss") + ext;
                string path = "../images/User/UploadPhoto/" + filename;
                fuPhoto.PostedFile.SaveAs(Server.MapPath(path));
                Response.Redirect("../Amdin/uploaduserphoto.aspx?Picurl=" + Server.UrlEncode(path));
            }
            else
            {
                //do some thing;
            }
        }

        protected void btn_Image_Click(object sender, EventArgs e)
        {
            int imageWidth = Int32.Parse(txt_width.Text);
            int imageHeight = Int32.Parse(txt_height.Text);
            int cutTop = Int32.Parse(txt_top.Text);
            int cutLeft = Int32.Parse(txt_left.Text);
            int dropWidth = Int32.Parse(txt_DropWidth.Text);
            int dropHeight = Int32.Parse(txt_DropHeight.Text);
            string filename = CutPhotoHelp.SaveCutPic(Server.MapPath(ImageIcon.ImageUrl), Server.MapPath(savepath), 0, 0, dropWidth, dropHeight, cutLeft, cutTop, imageWidth, imageHeight);
           
            this.imgphoto.ImageUrl = savepath + filename;
            Page.ClientScript.RegisterStartupScript(typeof(uploaduserphoto), "step3", "<script type='text/javascript'>Step3();</script>");
        }

    }
}
ExtJS Path 对象 类 --------------------编程问答--------------------
--------------------编程问答-------------------- 查一下部署,
有没 加  ruant ="server"了 ?
--------------------编程问答-------------------- CutPhotoHelp无法引用 --------------------编程问答--------------------
引用 3 楼 phoebuswei 的回复:
CutPhotoHelp无法引用

对就是这个错误   请问怎么引用呢 --------------------编程问答--------------------
引用 2 楼 yanghl1998 的回复:
查一下部署,
有没 加  ruant ="server"了 ?

是在前台加么?  前台已经加了···
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,