Script with in Editor window

Last post 03-26-2005, 10:22 AM by sdemmery. 2 replies.
Sort Posts: Previous Next
  •  03-25-2005, 4:45 PM 4973

    Script with in Editor window

    Hi all,
    I pretty new to asp.net & the editor, so please be gentle with me
     
    I already have one site working & all went fine, however Im now involved in a much more advanced project & have a question which Im sure someone will be able to answer easily.
     
    I have a template which is loaded into the editor & I make changes & save it to a MySQL database. This all works fine. But the resulting page, needs to have some details from a record set within the templated area. This area will be a locked section of the template which the user cannot change, but when viewed as the finished page, will contain some details from a recordset.
     
    How can I do this? I have tried wrting some simple code <%="Test"%> in the editor just to see if I can write script, but of course this dosent work. Can this be done in anyway? Im sure Im overlooking something really obvious but cant quite figure out what.
     
    Thanks in advance
     
    Stuart
  •  03-25-2005, 7:22 PM 4983 in reply to 4973

    Re: Script with in Editor window

    Stuart,
     
    Here are my suggestions:
     
    When the page loads, we need to populate the editor.
     
    string temp = "";'

    temp += "type here";
    temp += "<div contentEditable="false" UNSELECTABLE="ON">This Heading is not editable.</div>"; // You can put the data from recordset here.
    temp += "type here again";


    Editor1.Text = temp;

    Hope it helps.





     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-26-2005, 10:22 AM 4999 in reply to 4983

    Re: Script with in Editor window

    Thanks Adam,
    I just tried this method & it will do what I need it to.v

    I was looking at the issue in a totally different way. I seen a template being pulled into the editor, edits being made & then sent to the database. The page when pulled from the database would comeback having certain areas being populated at this time from the db. Clearly this is an uneconmic way to do things anyway as it results in two trips to the db. Once for the page & one for the page to pull any dynamic content.
     
    Sometimes I guess it just takes someone to state the obvious
     
    Again thanks for you help & keep up the good work
     
    Stuart
     
View as RSS news feed in XML