Differentiating Codes from Plain Text
-
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 FunctionHow can I achieve this please.
-
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 FunctionHow can I achieve this please.
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