MindSpiker.com
Skills: .net, SQL Server, Web Forms, C#, Visual Studio, JavaScript, HTML, CSS
MindSpiker.com
This website was made the old fashion way (from scratch) using Visual Studio using C# and .net (DotNet) Web Forms.
SQL Server Database Integration
Data for projects and comments are stored in a SQL Server database and can be added and edited directly from the web.
Handling HTML Text Entry Inside a .Net Webform
For HTML content to be keyed from a web form TextBox control the data needs special handling.
Retrieving HTML from a TextBox
Before the text is uploaded JavaScript is used to replace the greater (<) than and less than (>) symbols around HTML tags with their respective escape codes. Server side the text is saved as received to the database.
Displaying HTML Code in a TextBox
Server side decode the HTML retrieved from the database using Server.HtmlDecode(myTextFromDB)
then set the "Text" property of the TextBox to the decoded text.
Displaying HTML as HTML on a Web Page
Server side; decode the HTML retrieved from the database using
myDecodedHTML = Server.HtmlDecode(myTextFromDB)
then create a literal control using
new LiteralControl(myDecodedHTML )
then add it to the controls collection you want the HTML to appear in.