Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

first line of textarea won't align left

Status
Not open for further replies.

yusti

Programmer
Sep 4, 2001
3
BE
Hi,
I'm using following code to display the content of a databasefield called text. I want it to be displayed in a textarea in my asp page.
It does display allright but only the first line in the textarea doesn't want to display on the left side. What can I do about it?

Here is my code:


<textarea name=&quot;Bodytext&quot; rows=&quot;20&quot; cols=&quot;62&quot; style=&quot;font-family: Verdana, Arial&quot;>
<% set MyConnection = Server.createObject(&quot;ADODB.Connection&quot;)
MyConnection.Open Application(&quot;DataBaseConnection&quot;)


Set fragmentsSQLcmd = Server.CreateObject(&quot;ADODB.Command&quot;)
Set fragmentsSQLcmd.ActiveConnection = MyConnection
Set fragmentsSQLrec = Server.CreateObject(&quot;ADODB.Recordset&quot;)
fragmentsSQLcmd.CommandText = &quot;Select * from EMAILPageFragments where idpage = &quot; & Status & &quot; ORDER BY EMAILPageFragments.postionOnPage&quot;
fragmentsSQLcmd.CommandType = 1
fragmentsSQLrec.Open fragmentsSQLcmd, , adOpenDynamic, 1
do while (not fragmentsSQLrec.EOF)

Set fragmentSQLcmd = Server.CreateObject(&quot;ADODB.Command&quot;)
Set fragmentSQLcmd.ActiveConnection = MyConnection
Set fragmentSQLrec = Server.CreateObject(&quot;ADODB.Recordset&quot;)
fragmentSQLcmd.CommandText = &quot;Select * from EMAILfragment where id = &quot; & fragmentsSQLrec(&quot;idfragment&quot;)
fragmentSQLcmd.CommandType = 1
fragmentSQLrec.Open fragmentSQLcmd, , 0, 1

do while(not fragmentSQLrec.EOF)
Response.write(fragmentSQLrec(&quot;text&quot;))
Response.write(vbcrlf)
fragmentSQLrec.MoveNext
loop
fragmentSQLrec.Close
fragmentsSQLrec.MoveNext
loop
fragmentsSQLrec.Close
set MyConnection = Nothing
%>
</textarea>
 
I doubt it's anything at all to do with the ASP - since untrimmed data has the spaces at the other end - so it must be something beng passed in the string.

Or is there and empty field which is being included?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top