Problem with editor.text

  •  08-03-2010, 7:05 AM

    Problem with editor.text

    I'm checking if the text has been modified and if it has i will save it to a database. The method i'm using works with firefox but not IE.
    When using this with IE it puts in extra space at the end of the string.
     
    This is what i have, i use the labels for debugging.
     
            if (!IsPostBack)
            {
                var query ... database action..
     
                    editor1.Text = query.ToString();
                    Session["orgText"] = query.ToString();
            }
     
     
        protected void editor1_PostBackCommand(object sender, CommandEventArgs e)
        {
            if (e.CommandName == "Save")
            {
                string orgText = (string)Session["orgText"];
                
                if (editor1.Text == orgText)
                {
                    label1.text = "No change!";
                }
                else
                {
                   Databse action.....
                   label1.text = "Text has been saved";
                }
            }

        }
     
     
    Why does it matter if i use IE or Firefox.
    Is there any better why to check this without using Sessions ?
View Complete Thread