Results 1 to 3 of 3

Thread: Posting code on a web page

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Location
    Springfield, IL
    Posts
    124
    I want to display some vbscript code in an asp page. I want the code to be formatted as it is in the file and colored as it is when code is posted here. Can someone help me with this?

    Thanks

  2. #2
    Lively Member
    Join Date
    May 2000
    Posts
    123
    you are talking about displaying the formatted vb code in the browser right?

    if so one way would be to write a CSS for the page and apply it to the code

  3. #3
    Guest
    Not gonna work highlife... cascading stylesheets work on tags... you would have to put one kinda tag around each keyword and have a reference to that in the css...then do the same for all the numbers, then for all the strings, then all the errors, then all... too much like hard work!

    You could use the one that's on this bb ... write a message and hit the preview button, then rip off the code... I did that once but you have to spend so long ripping out unneeded code that it's really not worth it.

    You might as well just spend a bit of time putting the appropriate <font> tags around all the code.

    Better still write a search and replace algorithm that replaces all the:

    Dim

    with:

    <font color="navy">Dim</font>

    and so on...then make it put:

    <font face="courier new">

    tags around the whole lot... might take a while to write but the end result would be useful

    Might even do that myself...nah, can't be bothered

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width