Best data type for storing html css javascript

A good day.

I have a PHP background and MySql, and I'm just starting with ASP.NET. I have no background with ASP, I have experience with C #.

Well, my problem is very simple, I would like to be able to save HTML, CSS and Javascript code directly in the MS SQL Server database.

However, I don’t know which type of data is more recommended to be stored in the code, but do not forget that I would like to keep the original formatting of the code (interrupt lines, generation, etc.).

Any help is appreciated.

Environment Details:

  • Windows 7 (x86)
  • Visual Studio 2010 Ultimate
  • Sql Server 2008
  • ASP.NET and C #
  • NET Framework 4.0

Thank.

+3
source share
4

varchar(#) , , , nvarchar(#). # . max , , (, , ).

+4

varchar (max) nvarchar (max), 2 -1

MSDN ntext

ntext, text Microsoft SQL Server. . nvarchar (max), varchar (max) varbinary (max).

+1

VARCHAR (MAX). SQL Server 2005 Microsoft varchar (max) nvarchar (max), varchar, 2 . varchar (max) ( 8K), . , , -.

, Microsoft .

0

You can use or if you have a unicode language in your use, html has unlimited length columns for your data. nText Text
nText
nText

0
source

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


All Articles