Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

make raws problem

Status
Not open for further replies.

bereza

Technical User
Jun 14, 2006
105
EU
Hi everybody,

I have created a simple news site. the news is stored in SQL Server 2005. I have used C# and SqlDataSource and usual Insert or update command.

the problem is whole the text will be saved as a one raw, even I have used Enter key to make new raws but whole text showed up as one singe raw.

The columns type is ntext.

I show the text by using <asp:label> is the label that causes the problem or the white spaces were not been saved on the database??

thanks for your help
 
Check the actual database to see if the data is being stored correctly. If it is then it's strictly a front end issue.

You'll want to change the data type of that column from NTEXT to NVARCHAR(MAX). The NTEXT datatype is the old one, the NVARCHAR(MAX) data type is the new data type starting in SQL 2005. Eventually the NTEXT data type will be removed.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
beraza said:
I show the text by using <asp:label>
I take it then this is an ASP.NET application?

Since you are displaying the data in HTML, you will need to use <br> tags where you want line breaks.

Joe Schwarz
Custom Software Developer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top