Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#2.0 ASP.NET HTML
I've been searching the net for days for a way to store and view (retrieve) formatted documents.
 
It was my understanding that one could:
 
A: store a formatted document (With pure html like you get from copying gmail text) in sql server (a datatype of 'Text').
 
B: then output it again to a label or textbox and it would have the same formatting (Bold, carriage returns, etc).
 

I've accomplished part A, (when I hover over the field in SSMS, it shows at least the spacing and line skips that match the original doc) but text shows up in my controls as one fluid line of plain text, even with the textbox set to multiline. Labels populate no better.
 
I'm using C# asp.net in Visual Studio with the 2.0 framework
 
Is there an easy way to do this? Thanks in advance!
Posted 7-Feb-10 13:07pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Brian Fay wrote:
B: then output it again to a label or textbox and it would have the same formatting (Bold, carriage returns, etc).

 
No, you'd use a Literal control to do that.
  Permalink  
Comments
Gideon A Brits at 24-Jan-13 9:09am
   
In order for images to display properly in this manner you must remember to include the full path for the image including the "http://"
 
<img src="http://www.mydomain.com/MyFolder/MyImage.png" />
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

I will need to familiarize myself with the Literal Control. Any hints on how to use it. I'll look it up in the mean time.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Posted 19 hours ago
Christian had it right! Thanks!
 
I looked up 'literal control' and that was all I needed:
 
http://blogs.techrepublic.com.com/programming-and-development/?p=618
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 490
1 Maciej Los 299
2 BillWoodruff 174
3 /\jmot 170
4 Suraj Sahoo | Coding Passion 150
0 OriginalGriff 8,484
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,639
3 Maciej Los 5,159
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 8 Feb 2010
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100