We have an asp.net page that displays data from a SQL table that is updated
from a VB application. That application uses vbCrLf to denote line breaks.
How can I replace them with "<br />" before they get displayed in my
GridView? Thanks.
David 7 1825
Options:
1. Use the row binding event to do a search/replace
2. Search/replace in your database, before you have the data in .NET
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog http://gregorybeamer.spaces.live.com/lists/feed.rss
or just read it: http://gregorybeamer.spaces.live.com/
*************************************************
| Think outside the box!
|
*************************************************
"David C" <dl*****@lifetimeinc.comwrote in message
news:ub**************@TK2MSFTNGP05.phx.gbl...
We have an asp.net page that displays data from a SQL table that is
updated from a VB application. That application uses vbCrLf to denote
line breaks. How can I replace them with "<br />" before they get
displayed in my GridView? Thanks.
David
I want to use option 1 but I get an error. Below is what I have in the row
databound event:
Dim varControl
varControl = e.Row.FindControl("EventNotes")
varControl.Text = Replace(varControl.Text, vbCrLf, "<br />")
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in
message news:uz**************@TK2MSFTNGP03.phx.gbl...
Options:
1. Use the row binding event to do a search/replace
2. Search/replace in your database, before you have the data in .NET
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog http://gregorybeamer.spaces.live.com/lists/feed.rss
or just read it: http://gregorybeamer.spaces.live.com/
*************************************************
| Think outside the box! |
*************************************************
"David C" <dl*****@lifetimeinc.comwrote in message
news:ub**************@TK2MSFTNGP05.phx.gbl...
>We have an asp.net page that displays data from a SQL table that is updated from a VB application. That application uses vbCrLf to denote line breaks. How can I replace them with "<br />" before they get displayed in my GridView? Thanks.
David
What is the error you are getting?
David Wier http://aspnet101.com http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
"David C" <dl*****@lifetimeinc.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>I want to use option 1 but I get an error. Below is what I have in the row databound event:
Dim varControl
varControl = e.Row.FindControl("EventNotes")
varControl.Text = Replace(varControl.Text, vbCrLf, "<br />")
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in
message news:uz**************@TK2MSFTNGP03.phx.gbl...
>Options:
1. Use the row binding event to do a search/replace 2. Search/replace in your database, before you have the data in .NET
-- Gregory A. Beamer MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog http://gregorybeamer.spaces.live.com/lists/feed.rss
or just read it: http://gregorybeamer.spaces.live.com/
*********************************************** ** | Think outside the box! | *********************************************** ** "David C" <dl*****@lifetimeinc.comwrote in message news:ub**************@TK2MSFTNGP05.phx.gbl...
>>We have an asp.net page that displays data from a SQL table that is updated from a VB application. That application uses vbCrLf to denote line breaks. How can I replace them with "<br />" before they get displayed in my GridView? Thanks.
David
Nevermind. I looked at it again and the control name was misspelled.
David
"David Wier" <dw@dw.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
What is the error you are getting?
David Wier http://aspnet101.com http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with
no bloated markup
"David C" <dl*****@lifetimeinc.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>>I want to use option 1 but I get an error. Below is what I have in the row databound event:
Dim varControl
varControl = e.Row.FindControl("EventNotes")
varControl.Text = Replace(varControl.Text, vbCrLf, "<br />")
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in message news:uz**************@TK2MSFTNGP03.phx.gbl...
>>Options:
1. Use the row binding event to do a search/replace 2. Search/replace in your database, before you have the data in .NET
-- Gregory A. Beamer MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog http://gregorybeamer.spaces.live.com/lists/feed.rss
or just read it: http://gregorybeamer.spaces.live.com/
************************************************ * | Think outside the box! | ************************************************ * "David C" <dl*****@lifetimeinc.comwrote in message news:ub**************@TK2MSFTNGP05.phx.gbl... We have an asp.net page that displays data from a SQL table that is updated from a VB application. That application uses vbCrLf to denote line breaks. How can I replace them with "<br />" before they get displayed in my GridView? Thanks.
David
"David C" <dl*****@lifetimeinc.comwrote in message
news:eX**************@TK2MSFTNGP04.phx.gbl...
Nevermind. I looked at it again and the control name was misspelled.
David
"David Wier" <dw@dw.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>What is the error you are getting?
David Wier http://aspnet101.com http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no bloated markup
"David C" <dl*****@lifetimeinc.comwrote in message news:%2****************@TK2MSFTNGP03.phx.gbl...
>>>I want to use option 1 but I get an error. Below is what I have in the row databound event:
Dim varControl
varControl = e.Row.FindControl("EventNotes")
varControl.Text = Replace(varControl.Text, vbCrLf, "<br />")
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in message news:uz**************@TK2MSFTNGP03.phx.gbl... Options:
1. Use the row binding event to do a search/replace 2. Search/replace in your database, before you have the data in .NET
-- Gregory A. Beamer MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog http://gregorybeamer.spaces.live.com/lists/feed.rss
or just read it: http://gregorybeamer.spaces.live.com/
*********************************************** ** | Think outside the box! | *********************************************** ** "David C" <dl*****@lifetimeinc.comwrote in message news:ub**************@TK2MSFTNGP05.phx.gbl... We have an asp.net page that displays data from a SQL table that is updated from a VB application. That application uses vbCrLf to denote line breaks. How can I replace them with "<br />" before they get displayed in my GridView? Thanks. > David >
Turn on your options Strict and Explicit.
Compiler will tell you most of your problems before you run.
LS
You want someone to help debug an error without saying what that error is?
--
Jonathan Wood
SoftCircuits Programming http://www.softcircuits.com
"David C" <dl*****@lifetimeinc.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>I want to use option 1 but I get an error. Below is what I have in the row databound event:
Dim varControl
varControl = e.Row.FindControl("EventNotes")
varControl.Text = Replace(varControl.Text, vbCrLf, "<br />")
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in
message news:uz**************@TK2MSFTNGP03.phx.gbl...
>Options:
1. Use the row binding event to do a search/replace 2. Search/replace in your database, before you have the data in .NET
-- Gregory A. Beamer MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog http://gregorybeamer.spaces.live.com/lists/feed.rss
or just read it: http://gregorybeamer.spaces.live.com/
*********************************************** ** | Think outside the box! | *********************************************** ** "David C" <dl*****@lifetimeinc.comwrote in message news:ub**************@TK2MSFTNGP05.phx.gbl...
>>We have an asp.net page that displays data from a SQL table that is updated from a VB application. That application uses vbCrLf to denote line breaks. How can I replace them with "<br />" before they get displayed in my GridView? Thanks.
David
You can replace in SQL query or replace in datarowbind event.
suggest you replace in sql query, like:
select *,replace(TEXTFIELD,'
','<BR />') AS FIELD1 from table
"David C" <dl*****@lifetimeinc.com>
news:ub**************@TK2MSFTNGP05.phx.gbl...
We have an asp.net page that displays data from a SQL table that is
updated from a VB application. That application uses vbCrLf to denote
line breaks. How can I replace them with "<br />" before they get
displayed in my GridView? Thanks.
David This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: jason |
last post by:
Hello.
I just converted some data to to sql2000 into a TEXT type field. I
needed to remove all tabs from the data and now want to remove extra
lines too.
As we know, SQL2000's replace function...
|
by: Grant Mills |
last post by:
I'm trying to get linefeeds to display correctly in a datagrid (text is
taken from a database of text that has been htmlencoded)
By default it doesn't display them. But <br/> tags display fine.
...
|
by: Grant Mills |
last post by:
I'm trying to get linefeeds to display correctly in a datagrid (text is
taken from a database of text that has been htmlencoded)
By default it doesn't display them. But <br/> tags display fine.
...
|
by: tshad |
last post by:
How do I go about this?
I used to know this, but can't find VB.net replace that does this.
Something like
string.replace("<br>",NL)
Thanks,
|
by: Neo Geshel |
last post by:
Greetings
I am using VB in my ASP.NET project that uses an admin web site to
populate a database that provides content for a front end web site. I am
looking for a way to use replace() to...
|
by: Guy |
last post by:
Hi,
I'm trying to run this code :
strFileContentsHTML.Replace(vbLf, "<br>")
strFileContentsHTML.Replace(vbCrLf, "<br>")
strFileContentsHTML.Replace(vbCr, "<br>")
It doesn't replace newline...
|
by: alainfri |
last post by:
I am not sure if this group is the right place for this question but
what I need is as follows. There is a piece of html. Throughout the
html there are a lot of <brtags. The task is to replace all...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |