Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

How can I save the text entered in the html editor as an html document?

$
0
0

Hello, 

I need to save the text entered in the html editor as an html document.  Is this possible?  I would like the html file to be saved in a sql database, and then be able to view that file later by somehow accessing the file from sql and viewing the webpage. 

I have tried this: 

....................................................

string html = string.Concat("<html><body>", TextBox1.Text, "</body></html>");

SqlDataSource1.InsertParameters["Comment1"].DefaultValue = html;

SqlDataSource1.Insert();

.....................................................

where TextBox1.Text would be the text inside the html editor and Comment1 is the field in my database. 

But when I do this all that gets stored, obviously, is the html (not the .html FILE).  I need the FILE. 

OR...if there is a way to open a webpage from html stored in a sql database that would also be fine. 

Any ideas?


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>