Database to HTML in C#.NET

SoundTheSurrender

Diamond Member
Mar 13, 2005
3,126
0
0
What would this be called.

You read a database that has some HTML code and display it as HTML?

Much like how forums work when a user posts a message with a image posted and stuff like that?

Thanks
 

SoundTheSurrender

Diamond Member
Mar 13, 2005
3,126
0
0
I know that.

I'm asking when someone posts something into a forum, how do I take that data from a database and make turn it into HTML code.


 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
With code?

Sorry, couldn't resist.

Tell us more about what you want to do, and where / how the C# is running.

Is this an ASP.NET server where you want to respond to a page request by retrieving some content like a set of thread posts, and run the content through a filter to change [ b ] to < b > etc. after carefully validating the content against attacks / exploitst?
 

clamum

Lifer
Feb 13, 2003
26,256
406
126
Yeeeahhh, need some more information about what you'd like to accomplish exactly. Sure you can grab information from an input form, write it to a database, and then write out the new change (in your forum example). It's not IMO a hugely complex thing but there's a lot of different smaller tasks to learn and be aware of (security is a good point as DaveSimmons mentioned).
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
When a client browser requests an HTML resource the web server simply reads the page off disk and sends it. When a browser requests an executable resource, such as .cgi, .aspx, .php, etc., the web server finds the referenced resource and executes it. That resource queries the database and formats the returned data into HTML or XML and hands it back to the web server. The server then returns it to the client. Round-trip complete.