I have a PHP & MySql background, and I'm just starting with ASP.NET. I don't have any background with ASP, only have experience with C#.
However i don't know which data type is more advised to store code, bare in mind that i would like to keep the original code formatting (break lines, formating, etc).
Any help is appreciated.
varchar(#) if you know you will not be storing unicode characters, if you are going to store unicode characters use
nvarchar(#). Replace the # with the max number of characters. You can also specify
max instead of a number and it will store as much as you want (there probably is a limit, but I haven't run into it yet).