Re: &nbsp casues problem when spell checking

  •  04-19-2006, 2:19 AM

    Re: &nbsp casues problem when spell checking

      <%@ Register TagPrefix="ce" Namespace="CuteEditor" Assembly="CuteEditor" %>
    <%@ Page validateRequest="false" language="c#" Codebehind="SendEmail.aspx.cs" AutoEventWireup="false" Inherits="Elead.Web.UI.CRM.SendEmail" %>
    <%@ Register TagPrefix="igsch" Namespace="Infragistics.WebUI.WebSchedule" Assembly="Infragistics.WebUI.WebDateChooser.v5.1, Version=5.1.20051.1085, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" %>
     
    This is the error which is giving to me:
     
    This is the code related to CuteEditor we are using:-(Please Check the code)
     
    .aspx
       
    <TR>
               <TD align="center" colSpan="6">
                <div class="Spacer5px">&nbsp; &nbsp;
                </div>
                <CE:EDITOR id="cuteEditorEmail" runat="server" Width="100%" ThemeType="Office2003_BlueTheme"
                 Height="400px" ShowPreviewMode="False" EnableStripScriptTags="False">
    <FrameStyle Height="100%" BorderWidth="1px" BorderStyle="Solid" BorderColor="Silver" Width="100%" CssClass="CuteEditorFrame" BackColor="White">
    </FrameStyle>
    <PageProperties Title="" Description="" HtmlBase="" Keywords="">
    </PageProperties>
                </CE:EDITOR><FRAMESTYLE CssClass="CuteEditorFrame" Width="100%" Height="100%" BorderColor="#C0C0C0" BorderStyle="Solid"
                 BorderWidth="1px" BackColor="White"></FRAMESTYLE><PAGEPROPERTIES title="" Keywords="" HtmlBase="" Description=""></PAGEPROPERTIES></TD>
              </TR>
     
    ----------------------------------------------------------------------aspx.cs-------------------------------------------------------------------
    private void InitializeEditor(DataTable dtOpptyDetails)

    {

    User user = (User)Session["User"]; // Get the user information from Session

    // -------------- Cute editor code ----------------

    cuteEditorEmail.DisableAutoFormatting = true;

    cuteEditorEmail.RemoveServerNamesFromUrl = false;

    cuteEditorEmail.FilesPath = System.Configuration.ConfigurationSettings.AppSettings["CuteEditorPath"];

    cuteEditorEmail.ConfigurationPath = System.Configuration.ConfigurationSettings.AppSettings["CuteEditorConfigFilesPath"] + "Templates.config";

     

    cuteEditorEmail.SetSecurityFilesGalleryPath("~/Web/UI/Public1/Companies/" + ((Elead.Web.User)Session["user"]).Company.SzFolderName);

    cuteEditorEmail.SetSecurityImageGalleryPath("~/Web/UI/Public1/Companies/" + ((Elead.Web.User)Session["user"]).Company.SzFolderName);

    //suploadImages = FilePath.getInstance().GetFilePathForImages(user.CurrentRole.GuCompanyId);

    //cuteEditorEmail.Setting["security:ImageGalleryPath"]= suploadImages;

    cuteEditorEmail.SetSecurityFlashGalleryPath("~/Web/UI/Public1/Companies/" + ((Elead.Web.User)Session["user"]).Company.SzFolderName);

    cuteEditorEmail.SetSecurityMediaGalleryPath("~/Web/UI/Public1/Companies/" + ((Elead.Web.User)Session["user"]).Company.SzFolderName);

    CuteEditor.ToolControl toolControl = cuteEditorEmail.ToolControls["InsertablePhrases"];

    if (toolControl != null)

    {

    CuteEditor.RichDropDownList richDropDownList = (CuteEditor.RichDropDownList)toolControl.Control;

    // the first item is the caption

    CuteEditor.RichListItem richListItem = richDropDownList.Items[0];

    // clear the items from configuration files

    richDropDownList.Items.Clear();

    //add the caption

    richDropDownList.Items.Add("Insertable Phrases");

    // add text and value

    EntityCollection entityCollection = InsertablePhrases.getInstance().GetInsertablePhrases(user.Company.GuCompanyId);

    for(int nCount = 0;nCount < entityCollection.Count; nCount++)

    {

    string sEntityValue = ( ( TblWordTrackEntity )entityCollection[nCount]).SzWordTrackText;

    string sEntityName = ( ( TblWordTrackEntity )entityCollection[nCount]).SzWordTrackName;

    richDropDownList.Items.Add(sEntityName, sEntityValue);

    }

    //add html and text and value

    //richDropDownList.Items.Add("<img border=0 align='absMiddle' src='http://cutesoft.net/data/contact.gif' /> Contact us","Contact us","support@cutesoft.net");

    }

    toolControl = cuteEditorEmail.ToolControls["MergeCodes"];

    if (toolControl != null)

    {

    CuteEditor.RichDropDownList richDropDownList = (CuteEditor.RichDropDownList)toolControl.Control;

    // the first item is the caption

    CuteEditor.RichListItem richListItem = richDropDownList.Items[0];

    // clear the items from configuration files

    richDropDownList.Items.Clear();

    // add the caption

    richDropDownList.Items.Add("Merge Codes");

    // add text and value

    EntityCollection entityCollection;

     

    if (dtOpptyDetails.Rows[0][TblOpptyFieldIndex.SzStatus.ToString()].ToString().Equals(Util.Constants.OpptyStatus.Sold.ToString()))

    entityCollection = MergeCodes.getInstance().GetMergeCodes(user.Company.GuCompanyId, Util.Constants.MergeCodeSold);

    else

    entityCollection = MergeCodes.getInstance().GetMergeCodes(user.Company.GuCompanyId, Util.Constants.MergeCodeOppty);

     

     

    for(int nCount = 0;nCount < entityCollection.Count; nCount++)

    {

    string sEntityValue = ( ( TblTemplateTagEntity )entityCollection[nCount]).SzTemplateTag;

    string sEntityName = ( ( TblTemplateTagEntity )entityCollection[nCount]).SzDescription;

    richDropDownList.Items.Add(sEntityName, sEntityValue);

    }

     

     

    }

    // ------------------------------------------------

     

    toolControl = cuteEditorEmail.ToolControls["Images"];

    if (toolControl != null)

    {

    CuteEditor.RichDropDownList richDropDownList = (CuteEditor.RichDropDownList)toolControl.Control;

    // the first item is the caption

    CuteEditor.RichListItem richListItem = richDropDownList.Items[0];

    // clear the items from configuration files

    richDropDownList.Items.Clear();

    // add the caption

    richDropDownList.Items.Add("Images");

     

    string sFilePath = FilePath.getInstance().GetInternalPublicFileServerRoot(user.Company.GuCompanyId);

    string sPublicPath = Elead.Business.Objects.FilePath.getInstance().GetExternalPublicVirtualDirectoryRoot(user.Company.GuCompanyId);

    if (Directory.Exists(sFilePath))

    {

    // add text and value

    DirectoryInfo directoryInfo = new DirectoryInfo(sFilePath);

    FileInfo[] Files = directoryInfo.GetFiles();

    foreach(FileInfo fileInfo in Files)

    {

    richDropDownList.Items.Add(fileInfo.Name, "<img src='" + sPublicPath + fileInfo.Name + "' border='0'>");

    }

    }

    }

    // ------------------------------------------------

    }
     

    private void Page_Load(object sender, System.EventArgs e)

    {

    User user = (User)Session["User"]; // Get the user information from Session

    this.SmartNavigation = false;

    Literal1.Text = ""; // This must be here only as it should be made empty for every postback.

    // It is used for emitting Javascript

    // If it is opened from ContactTab then we can get the OpptyId from session, but if

    // it is opened from WeeklyOrganizer then get the OpptyId from Organizer

    if (Request.QueryString.Get("GuActivityId")!= null && Request.QueryString.Get("GuActivityId").Length > 0)

    {

    tblActivityEntity = Contact.GetInstance().GetActivityInformation(Request.QueryString.Get("GuActivityId"),user.Company.GuCompanyId);

    guOpptyId = tblActivityEntity.GuOpptyId;

    guCustomerId = tblActivityEntity.GuCustomerId;

    }

    else

    {

    if (Request.QueryString.Get("GuOpptyId") != null && Request.QueryString.Get("GuOpptyId").Length > 0)

    {

    guOpptyId = Request.QueryString.Get("GuOpptyId");

     

    if (Request.QueryString.Get("GuCustomerId") != null && Request.QueryString.Get("GuCustomerId").Length > 0)

    guCustomerId = Request.QueryString.Get("GuCustomerId");

    else

    guCustomerId = Opportunity.getInstance().FetchOppty(user.Company.GuCompanyId,guOpptyId).GuCustomerId;

    }

    }

View Complete Thread