cuteeditor1.Text returning " " with exception in Safari 3.1

Last post 03-20-2008, 2:30 PM by Pradnya. 2 replies.
Sort Posts: Previous Next
  •  03-20-2008, 11:27 AM 38199

    cuteeditor1.Text returning " " with exception in Safari 3.1

    Hi
    I have a cute editor user input control. When the user enters text in it and hits submit, I get this exception.
     
    Index was out of range. Must be non-negative and less than the size of the collection.  Parameter name: index
    at System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)     at CuteEditor.Convertor.HTMLNodes.get_Item(Int32 index)     at CuteEditor.Convertor.HTMLTree.a(HTMLNode A_0)     at CuteEditor.Convertor.HTMLTree..ctor(String html)     at CuteEditor.Convertor.RTF.HTML2RTF..ctor(String html)     at PES.RIW.ItemForm.btnAddScenario_Click(Object sender, EventArgs e) in C:\PES\Microsoft.NET\Visual Studio 2005\Projects\RIW\Staging\PES.RIW\ItemForm.ascx.cs:line 542     at System.Web.UI.WebControls.Button.OnClick(EventArgs e)     at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)     at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)     at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)     at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     
    When I debug, I see that cuteeditor1.Text is " ".
    It works fine in IE.
    Please help.
  •  03-20-2008, 1:35 PM 38205 in reply to 38199

    Re: cuteeditor1.Text returning " " with exception in Safari 3.1

  •  03-20-2008, 2:30 PM 38207 in reply to 38205

    Re: cuteeditor1.Text returning " " with exception in Safari 3.1

    Adam,
    no I can't. It is showing the html with the text I entered.
    I can't figure it out. here is my code to help you understand the problem-
     

    <CE:Editor ID="cuteScenario" runat="server" Width="100%" Text="Scenario Text" Height="125px"

    ShowBottomBar="False" ConfigurationPath="~/CuteSoft_Client/CuteEditor/Configuration/EditorToolBar.config">

    <FrameStyle BackColor="White" BorderStyle="Solid" Width="100%" Height="100%" CssClass="CuteEditorFrame"

    BorderWidth="1px" BorderColor="#DDDDDD"></FrameStyle>

    </CE:Editor>

    <asp:Button ID="btnAddScenario" OnClick="btnAddScenario_Click" runat="server" Text="Add Scenario"

    Visible="False"></asp:Button>

     

    protected void btnAddScenario_Click(object sender, EventArgs e)

    {

    HTML2RTF _html2rtf;

    Scenario _scenario = new Scenario();

    _scenario.DriveId = DriveId;

    _html2rtf = new HTML2RTF(cuteScenario.Text);

    _scenario.ScenarioTextPrint = _html2rtf.RTF;

    _scenario.ScenarioTextWeb = cuteScenario.Text;

    _scenario.ScenarioTextPlain = cuteScenario.PlainText;

    _scenario.LastActivityUser = new Guid(UserId);

    _scenario.LastActivityDate = DateTime.Now;

    int scenarioid = _scenario.Insert();
    }
     
    it's throwing an exception on the line marked in red.
    again, only in Safari. not in IE.
     
    Please help me!
View as RSS news feed in XML