davearia Posted July 16, 2005 Posted July 16, 2005 Hi All, How can I put text into my HTML dynamically? What I am trying to avoid is having created a generic/dynamic ASP.NET then put my text in the HTML. I would rather let the user select a page from the menu and based on that do a call to the database which would bring the text back. I can manage this part no problems, what I am finding difficulty with is what to do with text I bring back. Say if my result from the database is stored in a string called myText which holds the text along with any formatting tags etc. How would I use this string to render this text into my HTML along with all the formatting? Please help. Thank, Dave. :D :D :D Quote
Joe Mamma Posted July 16, 2005 Posted July 16, 2005 this might give you some ideas <HTML> <SCRIPT> function setSpan(s) { document.all.dynSpan.innerHTML = s; } </SCRIPT> <BODY> <TEXTAREA ID="theHTML" COLS="75" ROWS="10"></TEXTAREA> <BR> <BUTTON onclick="setSpan(document.all.theHTML.value);">Render</BUTTON> <BR> <SPAN ID="dynSpan"></SPAN> </body> </BUTTON> </BODY> </HTML> Quote Joe Mamma Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.
davearia Posted July 16, 2005 Author Posted July 16, 2005 Many thanks for that. I really appreciate the help. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.