I have a sql database program that has a memo field that contains text that has Rich Text Control Characters embeded into the text. The control characters are at the begining and the end of the field. Is there a way to remove these charatcters?
Thanks,If your data will fit in within a VARCHAR datatype, try CASTing it to VARCHAR first. Then you can do text manipulation on it. Memo fields won't let you.|||I did an analysis of the Rich Text Control Characters and it appears that the ending Characters are "\fs17". I made up the following command that searches the memo field for these characters and then display the remainder of the memo field:
Mid([SUMMARY],(InStr([SUMMARY],'\fs17')+5))
Thanks for the information!
Showing posts with label control. Show all posts
Showing posts with label control. Show all posts
Wednesday, March 21, 2012
Friday, March 9, 2012
Re-use data from SqlDataSource
I have a page containing a FormView, which gets its data from a SqlDataSource control and displays details of a job. Two of the fields are location and job title. I want to re-use this data to create a dynamic page title. I know I can do this by setting the Page.Title to what I want to, but do I have access to the data outside of the FormView to which the data source is bound? If so how? Or will I have to perform an additional SELECT statement to get this data again?
Hi
No need to perform additional Select statement. You can access the FormView data in DataBound event. Try the following code:
protected void FormView1_DataBound(object sender, EventArgs e) { Page.Title = ((Label)(FormView1.Row.FindControl("column1Label"))).Text; } Hope this helps.|||Brilliant. I've got that working nicely now, and discovered more events to play with
Thank you.
Subscribe to:
Posts (Atom)