How to get HTML formatted text in SQL Text field

I have a SQL Server table with a colun of type "Text" that contains HTML.  How can I load this HTML into some type of html control/container so it can be added to another control on my page using the syntax:  ControOnPage.Controls.Add(xxx)

The "xxx" is what I don't know how to create from a "Text" field type that contains HTML.
Thanks.
0
bostonnole
4/15/2004 6:37:44 PM
asp.net.getting-started 91979 articles. 4 followers. Follow

3 Replies
1124 Views

Similar Articles

[PageSpeed] 25

well one thing you could do is create a new literal control and add that to the page's control collection, just as you wrote, but use a literal control as the container:


ControlOnPage.Controls.Add(new LiteralControl(sqlHtmlText));

MCSD / MCAD / MCP
0
chapel21
4/15/2004 6:45:58 PM
It seems that you need to get Text string from db. Use DataReader object to do it.
a table in a table in a table in a table in a table...
0
boogeiwoogie
4/15/2004 6:45:59 PM
Thank you chapel.  Thank you very much.  The LiteralControl was exactly what I was looking for I just didn't know what it was called.
0
bostonnole
4/15/2004 7:05:54 PM
Reply:

Similar Artilces:

How do I get the Text of a Text ....
That may sound confusing, but I need to get the text of a Dynamically created text object. For each row the Text objects text might be somthing different, and when I loop through all the rows, I need to see if any of them are a certain Word. When I used Getitemstring, it doesn't like it. dw_1.Describe( 'text_control.text' ) will give you the .text attribute of a text control in a datawindow. How are you getting different values for the .text attributes on different rows? Using an expression or something? -- Paul Horan[TeamSybase] VCI Springfield, MA www.v...

How does text gets displayed in composer text field?
Hi, I'm new to TB dev. I stumbled upon this problem while trying to fix bug 309= 708. I am trying to figure out how does a message gets displayed in the com= poser window? I noticed that when I click edit on a mail in my drafts folde= r, the text in the uncompleted mail is displayed in the composer. I want to= do something similar to this. Does anyone know how does TB copy the text from the mail and display it on = the composer window? Is there like a textField.setText() to put the text into the composer's edi= ting text field? In another words, what function should i ca...

html formatted text to formatted text in a textbox ???
hi,i have html formatted text coming from my database and i want to show it as formatted in a textbox. assigning the database text to a label works fine but getting the db content in a textbox gets the html text, not the formatted text. Ex: <b> test </b> shows as it is and i want to show a bold "test" in textbox. any ideasthank you-shane** Edited by moderator Longhorn2005 ** You will need a RTE (Rich Text Editor) such as FreeTextBox or FCKeditor to display HTML formatted text.Ryan OlshanASPInsider | Microsoft MVP, ASP.NEThttp://ryanolshan.comHow to ask a question...

length or trim ? how can i get textbox.text as text that publichouse to textbox.text as text that public ?
hello friends length or trim ? how can i get textbox.text as text that publichouse to textbox.text as text that public ? second example is ..... textbox1.text is greenhouse.. i want to get green from textbox.text cheer Mark as me if my question or my answer can be helpful for you :) Hi,you can always perform a Trim to a retrieved string to delete the leading and trailing space characters. For your second example where you want to gt a part of the retrieved string you can use the SubString method of the String class.Grz, Kris. Read my blog. Handy Firefox plugins for web developers.Workar...

(Urgent) How Get a Text Field and put the result into a text Var
Hi All Iam trying to Get a text field value i wrote this code DECLARE @ptrval varbinary(16) DECLARE @length bigint SELECT @ptrval = TEXTPTR(Template), @length = LEN(Template) FROM #TEMPLATE READTEXT Template.#TEMPLATE @ptrval 0 @length but i need to put the result into a text var is that possible or not and if it possible any one could help me with thatWafi Mohtaseb You could return a text column as part of a result set. Are you trying to get the text back to ASP.NET?Starting with ASP.NET 2.0? Look at:Programming Microsoft Web Forms ...

I need a control to allow user to write Text and I get the Html of Text
Hi all i need a control to allow user to write Text , but i want the user to write Colored Text and so on . And i want to save the html of the text writen . Thanks all Hi, take a look at the free component, freetextbox. Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Workaround for non working Mark as answer buttons. hi , i downloaded the control you gave me , but it doesn't work good , For example , i want to insert the html tag it does in database , i get the tags , But it isn't inserted in database Please help if u can...

Get info from PropertyValueString
Hi All, I have inherited a project written by someone who was a much better programmer than myself and would appreciate some help in the right direction as I am way out of my depth. The problem is I need info about the logged in users profile in the asp_netProfile table which contains a field "PropertyValueString" with xml (nText field) in that looks like this:  <?xml version="1.0" encoding="utf-16"?><ProfileObject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"...

Format text field and field text box in datagrid
I have a column that allows the user to edit the datagrid.  When the Edit link is clicked, only one column is editable...this works.  The problems are that:1) the text box is only 75% of the width of the column2) when i type text into the text field, the size is a lot larger than the text in other non-editable columns3) the height of the text-box is too high.In summar, how can i format the editable field?I have tried doing so, in the Propery Builder>Format and changing the settings in the 'Edit Mode Items', that does not help.  I'm trying to use the XX-Small text size....

How to get focus on text field when HTML page is loaded?
I'd like to get focus automatically on a text field on a form when HTML page is loaded. Is there any method in JavaScript (getFocus(), requestFocus()?) or any HTML properties I could set? Thanks for any help. Kin ---== Posted via the PFCGuide Web Newsreader ==--- http://www.pfcguide.com/_newsgroups/group_list.asp <body onLoad="document.forms[2].<field name>.focus()"> -- pbm_hopethishelps, Roy Kiesler [TeamSybase] Sybase Developer Network (SDN) - http://sdn.sybase.com "Kin" <skinchu@bn.com> wrote in message news:BHKUd3Z8$GA.203@foru...

Newbee tring to get a sql row to text fields
  Hi there   I'm trying to execute a stored procedure and get the information into same textboxes. I tryed the code below, but it isn't working. Can somebody tell me why or if there is an beter way ?   Thanks in avance   Trasumaka   SqlConnection cn = new SqlConnection("server=.\\SQLEXPRESS; database=my_db; uid=myuser; pwd=mypasswd;"); cn.Open(); SqlCommand cm = new SqlCommand("MyProcr", cn); cm.CommandType = CommandType.StoredProcedure; cm.Parameters.AddWithValue("@MyParam01", "750200001127"); SqlDataReader reader = cm.ExecuteReader(); reader.Read()...

Getting IE runtime error when using Rich Text Editor in Text/HTML module
Hi guys, I've just installed DNN, applied a skin to a new portal and now when i try to add a TEXT/HTML module and modify it using the Rich Text Editor i get a little IE runtime error box pop up: A runtime Error has occurred. Do you wish to debug? Line: 51 Error: 'this.ftb.id' is null or not an object Any ideas??? Thanks Neile If you are referring to DNN 3.0.x then a quick search for 'this.ftb.id' in these forums should help....

getting the text from the html?
Guys, I have the web site running. Now let say I need to have a button somewhere "text only". My question comes, how can I make the web site run text only by running the web pages the way they ran and finally get rid of all html and buffer the text part only? Ideas? Brain storming? Thanks -F Can you rephrase the question? It isn't clear what you are trying to accomplish. Jared LivingstonMrLivingston.com - Livingston Family WebsiteTest/Demo site - moonmark.com Dim s As String = Request("id") ...

DOM, how to get text out of text node
Hi all, i am stack on this: i am parsing a dom document, i reach a text node, but i can't get the text out of the text node. Hope some one can help. this is the code: childs is a nsIDOMNodeList. PRUint32 len, i; childs->GetLength( &len ); nsCOMPtr<nsIDOMNode> child; nsEmbedString name; nsEmbedString value; PRUint16 type; for( i = 0; i < len; i++ ) { childs->Item( i, getter_AddRefs( child ) ); child->GetNodeType( &type ); child->GetLocalName( name ); ...

Converting a SQL Server TEXT field so we don't get overflow in a dw.
I thought this would work Convert(varchar(4099), Err.error_text), However, I am still getting a data overflow error. The column is defined on the SQL Server Side to be that of text and it is my understanding that the maximum size PB will hold in a dw in char(4099)....Someone correct me if I am wrong. Can anyone offer some suggestions? tia, chance. Chance; Until PB 11, you will have to do a SelectBlob ( ) on any "Text" data types (as far as I know). Regards ... Chris "chance" <chance@crwmail.com> wrote in message news:44590154$...

Web resources about - How to get HTML formatted text in SQL Text field - asp.net.getting-started

Formatted text - Wikipedia, the free encyclopedia
Formatted text cannot rightly be identified with binary files or be distinct from ASCII text. This is because formatted text is not necessarily ...

Received a badly formatted email on your mobile? 75 percent of you will delete it
A survey by Constant Contact shows that mobile devices are more important than ever, particularly to those under the age of 30. The study reveals ...

Quickly view formatted PDFs in your search results
Google search results sometimes include documents that were not originally formatted to be viewed in a web browser, such as PDFs. In the past, ...

Now in Google search results: Formatted PDFs
Google has launched a new search option called Quick View that allows users to open formatted PDF filesnot just HTML viewing of documentsfrom ...

Proxy ports showing formatted text in Mountain Lion
An interface bug in the OS X Network system preferences shows unconventional port string formats, but does not affect OS X performance.

It’s Markdown, no, PowerShell. Wait its Markdown formatted PowerShell.
... "Current DateTime is = $([System.DateTime]::Now)" ### Escape characters with the ` (back-tick) "Escape a quotation `"This is quoted`"." Formatted ...

Exploit can control older Macs even after they're formatted
Exploit can control older Macs even after they're formatted

HBO cancels 'In Treatment' 'as previously formatted'
HBO just made it official: In Treatment will not return for a fourth season. The psychotherapist drama won plenty of critical acclaim and Emmy ...

FAA GPS data formatted for your use
[Michael] posted up-to-date GPS data sets in the GPX format . These data sets are an alternative to paid updates. Since GPX is a published standard ...

Converting Mac-formatted iPod to Windows - iLounge Article
Q: In reading your FAQ and previous columns, I see that it is possible to use a Mac-formatted iPod on a Windows PC through the use of a third-party ...

Resources last updated: 11/30/2015 4:54:19 PM