Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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>

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...