This is a migrated thread and some comments may be shown as answers.

Editing and saving data to html page

2 Answers 181 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Phillip
Top achievements
Rank 1
Phillip asked on 01 Mar 2012, 03:40 PM
I'm assuming that the Editor control could be used to replace text area entries on a form and the data would be saved as usual with a Post to the server.

However, let's assume that I wanted to use it as a way for an admin user to edit content on the website - such as the the 'About' section of their webpage.  

Since this data isn't stored in the database and just text on an html page, how would I go about saving these edits?


2 Answers, 1 is accepted

Sort by
0
Piotr Jarocki
Top achievements
Rank 1
answered on 02 Mar 2012, 12:08 PM
you can't do it without server side, so if you don't have it in database, you still need to send it via POST/GET/WEBSOCKET to your server side code like PHP/C# etc and than change your file on server. But i think it easier just to put it into database? Javascript can't modify any file on server or even client (ok there is File API to change on client side, but only in sandboxed folder and it works only in chrome atm).
Guys from telerik can't change anything to modify your html files.
0
Phillip
Top achievements
Rank 1
answered on 02 Mar 2012, 09:09 PM
Thanks Piotr.  Saving in a database is no big deal.  I was just curious if it were possible somehow to write small changes to the html (like  you'd write changes to an xml file) without using the database.  I'll stick with the database and just use the editor as it was meant to be used.
Tags
Editor
Asked by
Phillip
Top achievements
Rank 1
Answers by
Piotr Jarocki
Top achievements
Rank 1
Phillip
Top achievements
Rank 1
Share this question
or