Jump to content

How to store Html tags in database and retrieve by aspx page


discuss97

Recommended Posts

Hi Friends.. suggest me...I update the database field by html coding like this...<pre><h2>W3Schools is best forum </h2><b> It is great websites for new Developer</b> </pre>but i retrive same text in aspx page....friend what i do 4 this..plz give gud comments. :)What a question

Link to comment
Share on other sites

Umm... you can't update a database via HTML, you'll need to use a server-side language such as ASP.NET. So, you can have a form control (http://www.w3schools.com/aspnet/aspnet_forms.asp), with a textarea, which stores the data into the database through ADO (http://www.w3schools.com/aspnet/aspnet_dbconnection.asp).Then, you can retrieve it also through ADO.

Link to comment
Share on other sites

There is nothing special you need to do to store HTML tags in your database. Databases don't understand HTML syntax and just store them like normal text.When you retrieve the HTML and render it (with Response.Write or Literal.Text) the browser will render it as HTML. If you want to display it as text (like in a tutorial) you'll need to replace < with < and > with >

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...