Re: Setting up cute editor ( submit button and saving in db )

  •  02-15-2009, 7:08 PM

    Re: Setting up cute editor ( submit button and saving in db )

    Hi afrika,
     
    1. Add a submit button which submits to our website
     
    You can add any button for sumit, like  <asp:Button ID="sumit" Text="Sumit" runat="server" OnClick="sumit_Click" />
     
    2. Save the users input in MS SQL database
     
    You can use Editor1.Text to read the user input of Editor and save by a button click method, like:
     
     protected void sumit_Click(object sender, EventArgs e)
        {
            string userText = Editor1.Text;
            //write userText into your database
        }
     
    3. How do we retrieve the saved data from the database and display in a .net page ?
     
    You can read the data from your database and display in page use Editor1.Text, like:
     
        protected override void OnLoad(EventArgs e)
        {
                   base.OnLoad(e);
            //Editor1.Text=get data from your database
        }
     
    4. Edit the displayed or saved data
     
    When the data display in page, you can edit it and reference question1 to save it in database again.
     
     
    Regards,
     
    Ken
View Complete Thread