We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to import the Data from word document to RTE and after the modification store it to the DataBase

Description:

We have a word document (application form), from that the data will be fetched and set as the content for the RTE. User can give the values for fields in the application form. Once the user presses the save button, the values will be stored to the DataBase. If the user enters the email-id, the remaining fields value will be shown automatically if the email id is already present in the DataBase.

 

Solution:

  1. Initialize the RTE with the custom tool for the save action.

 

C#

 

  1. The word document was kept in the App_Data folder and the data is fetched from the word document and set as value for the RTE in code behind.

 

C#

 

 

  1. User can only enter the text in input field, other than that user cannot edit, this can be achieved by setting the body’s contenteditable as false.

 

 

  1. Once user fill the form and click the save button, the data will be store to the DataBase.

Upon clicking to the Save button, the corresponding function (saveAction) will be triggered, in that all fields’ data are fetched in client side and using ajax function to call the storeData action method. The data are passed as the arguments.

Javascript

 

In code behind, the data will be stored to the “SaveData” table using SQL connection string.

 

C#

 

  1. If user fill the data which was already present in the DataBase, the remaining fields value will be fetched from the DataBase and display in the RTE

 

The email-id input field bounded with the “change” event, once the user enter or change the value, the following function will be triggered, the value of the email-id field send as the argument in ajax call.

 

Javascript

 

Once the user enters the “email-id”, the “retriveData” action method will be triggered, which was done using ajax call.

 

C#

 

Here, data is fetched from DataBase. In the success function of ajax call, set the data to the application form fields.

 

Article ID: Published Date: Last Revised Date: Platform: Control:
7096 09/06/2016 09/06/2016 ASP.NET Web Forms RichTextEditor
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.