Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi DayWalker,

 

you can use the HTML Tag.

for exsample

Response.Write("<br>") ' new Line

 

'Font Change

Response.Write("<font size=7 face=verdana color=#00ff66>")

Response.Write("My Test")

Response.Write("</font>")

 

Regards Datahighway

Posted

Depending on exactly what you are trying to do, you can use another method as well:

 

Instead of using Response.Write, you can Import System.Text and use the StringBuilder to dynamically create a string of html.

 

In the VB:

 

Imports System.Text

Public myhtml As String = String.Empty

 

Dim mystring As StringBuilder = New StringBuilder()

mystring.Append("htmlhere")

mystring.Append("morehtmlhere")

myhtml = mystring.ToString

 

 

In the aspx/html, wherever you want the html and text to show up:

 

<%=myhtml%>

  • *Gurus*
Posted
With the ASP.NET model it is improper to inject logic into the Web pages themselves unless it is located in a script block. More appropriately code that modifies the page should be located in a code-behind. Granted the construct "<%=<string>%>" will be converted to a literal by the ASP.NET parser, thereby effectively yielding the same end result, but with a penalty to the readability of the application's code.
Posted
thanks - that makes sense. what i hadn't realized, being pretty new to .net, is that the label tag can hold a whole string of html tags - I had always used it only for strings of text. So thanks for two answers in one!

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...