Answered by:
show html in a text box

Question
-
User693597704 posted
hello what I am doing is trying to view the html called for when a user views a page in a textbox..... probably going about it the wrong way anyways what I have is a database that some users will be able to insert html content to be displayed when others view the page ... so for testing purposes I have the following in a database
<style> <html> <HEAD> <META HTTP-EQUIV="imagetoolbar" CONTENT="no"> <style> <!-- BODY{ scrollbar-face-color:#b6bd49; scrollbar-arrow-color:#ffffff; scrollbar-track-color:#000000; scrollbar-shadow-color:#000000; scrollbar-highlight-color:#000000; scrollbar-3dlight-color:#000000; scrollbar-darkshadow-Color:#ffffff; } --> </style> <bgsound src="http://www.phillysdesigns2.com/music/"> </head> <a href="funnyfrogpagepastel.htm"> <BR> </a> <BR> <CENTER><TABLE BACKGROUND="http://i84.photobucket.com/albums/k14/philly49/funny%20frogs/frog1blur1.jpg" BORDER="1" WIDTH="20%" CELLPADDING="10" CELLSPACING="0"> <TR> <TD WIDTH="100%"> <CENTER><TABLE BACKGROUND="http://i84.photobucket.com/albums/k14/philly49/funny%20frogs/frog1blur.jpg" BORDER="1" WIDTH="20%" CELLPADDING="50" CELLSPACING="0"> <TR> <TD WIDTH="100%"> <CENTER><TABLE BACKGROUND="http://i84.photobucket.com/albums/k14/philly49/funny%20frogs/frog1blur1.jpg" BORDER="1" WIDTH="20%" CELLPADDING="10" CELLSPACING="0"> <TR> <TD WIDTH="100%"> <P><CENTER><TABLE BACKGROUND="http://i84.photobucket.com/albums/k14/philly49/funny%20frogs/frog1back.jpg" BORDER="1" WIDTH="100%" CELLPADDING="0" CELLSPACING="0"> <TR><TD WIDTH="100%"> <font face="arial bold" size="5" color="b6bd49"><center> <center><img src="http://i84.photobucket.com/albums/k14/philly49/funny%20frogs/funny1main.jpg" width="650"> <br> <br> <font size="6" font face="Brock Script"><b><font color="b6bd49">Good Luck in My Tourney<br> <br> <center><a href ="http://www.phillysdesigns2.com/"><font color="#b6bd49" size="5" font face="monotype corsiva"><b>*~*Page Designs by Philly*~*</b></font></a></center> <br> </font> <font color="#b6bd49" size="2" font face="georgia"> <center>Page layout copyright © 2008-2009 Phillys Designs<br /> <font></center> <br> <script language="JavaScript1.2"> /* Watermark Backgound Image Script- © Dynamic Drive (www.dynamicdrive.com) For full source code, 100's more DHTML scripts, and TOS, visit dynamicdrive.com */ if (document.all||document.getElementById) document.body.style.background="url('http://i84.photobucket.com/albums/k14/philly49/funny%20frogs/frog1tile.jpg') white center fixed" </script>
then I insert in textbox here
Rules.Text = DetailsView1.Rows.Item(13).Cells(1).Text
but what I see in the textbox when ran is this
<style> <html> <HEAD> <META HTTP-EQUIV="imagetoolbar" CONTENT="no"> <style> <!-- BODY{ scrollbar-face-color:#b6bd49; scrollbar-arrow-color:#ffffff; scrollbar-track-color:#000000; scrollbar-shadow-color:#000000; scrollbar-highlight-color:#000000; scrollbar-3dlight-color:#000000; scrollbar-darkshadow-Color:#ffffff; } --> </style> <bgsound src="http://www.phillysdesigns2.com/music/"> </head> <a href="funnyfrogpagepastel.htm"> <BR> </a> <BR> <CENTER><TABLE BACKGROUND="http://i84.photobucket.com/albums/k14/philly49/funny%20frogs/frog1blur1.jpg" BORDER="1" WIDTH="20%" CELLPADDING="10" CELLSPACING="0"> <TR> <TD WIDTH="100%"> <CENTER><TABLE BACKGROUND="http://i84.photobucket.com/albums/k14/philly49/funny%20frogs/frog1blur.jpg" BORDER="1" WIDTH="20%" CELLPADDING="50" CELLSPACING="0"> <TR> <TD WIDTH="100%"> <CENTER><TABLE BACKGROUND="http://i84.photobucket.com/albums/k14/philly49/funny%20frogs/frog1blur1.jpg" BORDER="1" WIDTH="20%" CELLPADDING="10" CELLSPACING="0"> <TR> <TD WIDTH="100%"> <P><CENTER><TABLE BACKGROUND="http://i84.photobucket.com/albums/k14/philly49/funny%20frogs/frog1back.jpg" BORDER="1" WIDTH="100%" CELLPADDING="0" CELLSPACING="0"> <TR><TD WIDTH="100%"> <font face="arial bold" size="5" color="b6bd49"><center> <center><img src="http://i84.photobucket.com/albums/k14/philly49/funny%20frogs/funny1main.jpg" width="650"> <br> <br> <font size="6" font face="Brock Script"><b><font color="b6bd49">Good Luck in My Tourney<br> <br> <center><a href ="http://www.phillysdesigns2.com/"><font color="#b6bd49" size="5" font face="monotype corsiva"><b>*~*Page Designs by Philly*~*</b></font></a></center> <br> </font> <font color="#b6bd49" size="2" font face="georgia"> <center>Page layout copyright © 2008-2009 Phillys Designs<br /> <font></center> <br> <script language="JavaScript1.2"> /* Watermark Backgound Image Script- © Dynamic Drive (www.dynamicdrive.com) For full source code, 100's more DHTML scripts, and TOS, visit dynamicdrive.com */ if (document.all||document.getElementById) document.body.style.background="url('http://i84.photobucket.com/albums/k14/philly49/funny%20frogs/frog1tile.jpg') white center fixed" </script>
when it should look like here :
http://www.phillysdesigns2.com/funny/frog1.htmThursday, March 6, 2014 10:37 PM
Answers
-
User177399542 posted
Hi Steve
The best way to show HTML markup in website pages is by using Syntax highlighter. You can use this one:
http://alexgorbatchev.com/SyntaxHighlighter/
Installation guide:
http://alexgorbatchev.com/SyntaxHighlighter/manual/installation.html
Working Example:
http://www.codingfusion.com/Post/Jquery-JSON-Add-Edit-Update-Delete-in-Asp-Net
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, March 6, 2014 11:17 PM