Ask a Question related to ASP Database, Design and Development.
-
Crnaovca #1
response.write from acccess problem, please help
I have a text in access database, annd it is copied from Word. Problem is
that when I want to put it on screen, usin response.write, all paragrafs
and new rows in tex are deleted, so when I want text to go in new row, on
place where I pressed Enter, text is displayed like there is no new row.
For example:
I entered in database text:
This is first row.
This is second row.
This is third row.
It is displayed like:
This is first row. Thhis is second row. This is third row.
What to do? I know one option is to put <br> everytime I want to go to new
row, but that is not an option for user.
Please help.
Crnaovca Guest
-
response.write URL
I have a page which lists conferences and events which the company for which I coded the site attends or hosts themselves. They want to be able to... -
If response.write help
Hi, I am trying to code my asp page so that if you are on page Y, the link to page Y in the nav, is in the over state to help users identify where... -
quotes in response.write
Hi there, I want to do: response.write("bla bla bla "in quotes" bla bla") How do I show the quotes on the screen in asp like I have to do \"... -
Response.Write and Response.Redirect
On my Page_Load event, i need to do some validation and then either let them proceed, or display a error message and boot them back to the previous... -
asp response.write doesn't display
Maybe you could start with a more barebones file, especially one without an unclosed LINK tag: -
Ken Schaefer #2
Re: response.write from acccess problem, please help
In your database, you have Chr(10) & Chr(13) as a newline/linefeed
combination.
A browser doesn't render these. It uses HTML tags for rendering.
Solution? Use Replace()
<%
Response.Write(Replace(strText, vbCrLF, "<br>" & vbCrLf))
%>
Cheers
Ken
"Crnaovca" <crnaovca@net.hr> wrote in message
news:opr6yeniepr1tjnq@news.carnet.hr...
: I have a text in access database, annd it is copied from Word. Problem is
: that when I want to put it on screen, usin response.write, all paragrafs
: and new rows in tex are deleted, so when I want text to go in new row, on
: place where I pressed Enter, text is displayed like there is no new row.
: For example:
:
: I entered in database text:
: This is first row.
: This is second row.
: This is third row.
:
: It is displayed like:
: This is first row. Thhis is second row. This is third row.
:
: What to do? I know one option is to put <br> everytime I want to go to new
: row, but that is not an option for user.
: Please help.
Ken Schaefer Guest
-
Crnaovca #3
Re: response.write from acccess problem, please help
I am doing things like that. But isn't there some other way? I cannot
expect from user that everytime user posts some article, he has to write
<br> instead of Enter. There must be some way to take aticle user has
wrote and save it in some way that when I write it to screen it is written
exaclty the same...
Sorry for english....
Crnaovca Guest
-
Ken Schaefer #4
Re: response.write from acccess problem, please help
Hi,
You have the user enter the text as they are currently entering it.
When you write this to the screen, you dynamically replace the Chr(13) &
Chr(10) that the user entered (by pressing [enter]) with "<br>"
Just to be clear:
THE USER DOES NOT HAVE TO ENTER <br> TAGS!
Please reread the code snipped that I posted.
Cheers
Ken
"Crnaovca" <crnaovca@net.hr> wrote in message
news:opr6yjrtumr1tjnq@news.carnet.hr...
: I am doing things like that. But isn't there some other way? I cannot
: expect from user that everytime user posts some article, he has to write
: <br> instead of Enter. There must be some way to take aticle user has
: wrote and save it in some way that when I write it to screen it is written
: exaclty the same...
: Sorry for english....
Ken Schaefer Guest
-
Maarten #5
Re: response.write from acccess problem, please help
Save the text of your WORD as HTML and put this text into your database.
Maarten Guest
-
Aaron Bertrand [MVP] #6
Re: response.write from acccess problem, please help
NO!!!!!!!! Word makes awful, awful, awful HTML that is bloated and very
difficult to read and manipulate. Please don't suggest this; the original
poster just has a problem understanding that plain text and HTML are
rendered differently, and the REPLACE() solution is the tidiest way to
accommodate for the difference.
--
Aaron Bertrand
SQL Server MVP
[url]http://www.aspfaq.com/[/url]
"Maarten" <nobody@spam.com> wrote in message
news:Gxtic.84732$Ch1.5619820@phobos.telenet-ops.be...> Save the text of your WORD as HTML and put this text into your database.
>
>
Aaron Bertrand [MVP] Guest
-
Crnaovca #7
Re: response.write from acccess problem, please help
I don't have such problem. I understand that. But, as much replace
function is tidy way of doing that, I suceeded not so long ago to
retreive text from database, and it was displayed fine. I never used
replace function till this day for such use but it still worked. Problem
is that I cannot remember whhat I did, I used some other function, but I
cannot remember what. Anyway, I want to thank Ken Shaefer for answer, I
listened his advice.
On Sat, 24 Apr 2004 18:43:43 -0400, Aaron Bertrand [MVP]
<aaron@TRASHaspfaq.com> wrote:
> NO!!!!!!!! Word makes awful, awful, awful HTML that is bloated and very
> difficult to read and manipulate. Please don't suggest this; the
> original
> poster just has a problem understanding that plain text and HTML are
> rendered differently, and the REPLACE() solution is the tidiest way to
> accommodate for the difference.
>
--
Using M2, Opera's revolutionary e-mail client: [url]http://www.opera.com/m2/[/url]
Crnaovca Guest
-
Aaron Bertrand [MVP] #8
Re: response.write from acccess problem, please help
Maybe the <PRE> tag. There aren't too many ways to render plain text as
HTML...
--
Aaron Bertrand
SQL Server MVP
[url]http://www.aspfaq.com/[/url]
"Crnaovca" <crnaovca@net.hr> wrote in message
news:opr6z77sowr1tjnq@news.carnet.hr...>I don't have such problem. I understand that. But, as much replace function
>is tidy way of doing that, I suceeded not so long ago to retreive text
>from database, and it was displayed fine. I never used replace function
>till this day for such use but it still worked. Problem is that I cannot
>remember whhat I did, I used some other function, but I cannot remember
>what. Anyway, I want to thank Ken Shaefer for answer, I listened his
>advice.
Aaron Bertrand [MVP] Guest
-
Crnaovca #9
Re: response.write from acccess problem, please help
No, no... <pre> tag is for different use.
Crnaovca Guest
-
Aaron Bertrand [MVP] #10
Re: response.write from acccess problem, please help
However, it is the only other way I know of to render a manual carriage
return as a carriage return in HTML, other than replace a CR/LF pair with an
HTML <BR> tag.
If you already know the answer, which your smug response implies, why don't
you tell us?
--
Aaron Bertrand
SQL Server MVP
[url]http://www.aspfaq.com/[/url]
"Crnaovca" <crnaovca@net.hr> wrote in message
news:opr61bnxssr1tjnq@msnews.microsoft.com...> No, no... <pre> tag is for different use.
Aaron Bertrand [MVP] Guest



Reply With Quote

