What's wrong with my code?

  •  11-29-2005, 11:35 AM

    What's wrong with my code?

    The code works fine in my developer machine, But when i publish it, the page rasie a runtime error,but another page also use cute editor works fine.
    Here is my code :
    public class FileEditor : System.Web.UI.Page
     {
      protected System.Web.UI.WebControls.DropDownList DropDownList1;
      protected System.Web.UI.WebControls.Button Button1;
      protected CuteEditor.Editor inputCont;
      private void Page_Load(object sender, System.EventArgs e)
      {
          if(!Page.IsPostBack)
       {
        LoadFile();
       }
      }
      public string FileName
      {
       get {return(Server.MapPath(this.DropDownList1.SelectedValue));}
      }
      #region Web Form 
      override protected void OnInit(EventArgs e)
      {
       //
       // CODEGEN: 
       //
       InitializeComponent();
       base.OnInit(e);
      }
      
        /// </summary>
      private void InitializeComponent()
      {   
       this.DropDownList1.SelectedIndexChanged += new System.EventHandler(this.DropDownList1_SelectedIndexChanged);
       this.Button1.Click += new System.EventHandler(this.Button1_Click);
       this.Load += new System.EventHandler(this.Page_Load);
      }
      #endregion
      private void Button1_Click(object sender, System.EventArgs e)
      {
       try
       {
        inputCont.SaveFile(FileName);
       }
       catch(Exception e1)
       {
        Response.Write(e1.Source + "<Br>" + e1.Message);
       }
      }
      private void Button2_Click(object sender, System.EventArgs e)
      {
       //inputCont.LoadHtml(FileName);
      }
      private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
      {
       LoadFile();
      }
      private void LoadFile()
      {
       try
       {
        inputCont.LoadHtml(FileName);
       }
       catch(Exception e)
       {
        Response.Write(e.Source + "<Br>" + e.Message);
       }
      }
      
     }
View Complete Thread