How to show code snippet on an ASP.NET page with color formatting

I want to show the code on the asp.net page, how to show the code fragment that it will look in the same color as in visual studio, the best example I can give is stackoverflow.com itself, we can put the code fragment into our question that looks well-colored giving a better user experience

I just don't have a clue? also how to store code snippets when the user enters them?

+3
source share
3 answers

StackOverflow uses Prettify to syntax highlighting.

, ? , .

+3

, Google Prettify, , Stack Overflow.

+4

, , .

Prettify , SyntaxHighlighter, .

SyntaxHighlighter -.

, Highlighter "service".

:

+2

Source: https://habr.com/ru/post/1730088/


All Articles