Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Differentiating Codes from Plain Text

Differentiating Codes from Plain Text

Scheduled Pinned Locked Moved ASP.NET
csharphelpquestionhtmlasp-net
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Otekpo Emmanuel
    wrote on last edited by
    #1

    Good day everyone! Please I need help in this issue as I have tried but the result am getting is not good enough to my satisfaction. I know how to save and retrieve html tags to/from database but believe me doing it for codebehind is really tough for me. Now, my request is that, how and what is the best way to display posted codebehind in asp.net just codeproject do to all content within code tag. For instance, codeproject would identify the following function and even markoff comment line as visual studio does.

    Public Function Something(val As Integer) As Integer
    'Code to run
    Return Something
    End Function

    How can I achieve this please.

    Richard DeemingR 1 Reply Last reply
    0
    • O Otekpo Emmanuel

      Good day everyone! Please I need help in this issue as I have tried but the result am getting is not good enough to my satisfaction. I know how to save and retrieve html tags to/from database but believe me doing it for codebehind is really tough for me. Now, my request is that, how and what is the best way to display posted codebehind in asp.net just codeproject do to all content within code tag. For instance, codeproject would identify the following function and even markoff comment line as visual studio does.

      Public Function Something(val As Integer) As Integer
      'Code to run
      Return Something
      End Function

      How can I achieve this please.

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      It depends on how you're displaying the code. If you're displaying it in a web page, then the simplest option is to use a Javascript syntax highlighter. For example, highlight.js[^].


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups