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="Bodytext" rows="20" cols="62" style="font-family: Verdana, Arial">
<% set MyConnection = Server.createObject("ADODB.Connection"
MyConnection.Open Application("DataBaseConnection"
Set fragmentsSQLcmd = Server.CreateObject("ADODB.Command"
Set fragmentsSQLcmd.ActiveConnection = MyConnection
Set fragmentsSQLrec = Server.CreateObject("ADODB.Recordset"
fragmentsSQLcmd.CommandText = "Select * from EMAILPageFragments where idpage = " & Status & " ORDER BY EMAILPageFragments.postionOnPage"
fragmentsSQLcmd.CommandType = 1
fragmentsSQLrec.Open fragmentsSQLcmd, , adOpenDynamic, 1
do while (not fragmentsSQLrec.EOF)
Set fragmentSQLcmd = Server.CreateObject("ADODB.Command"
Set fragmentSQLcmd.ActiveConnection = MyConnection
Set fragmentSQLrec = Server.CreateObject("ADODB.Recordset"
fragmentSQLcmd.CommandText = "Select * from EMAILfragment where id = " & fragmentsSQLrec("idfragment"
fragmentSQLcmd.CommandType = 1
fragmentSQLrec.Open fragmentSQLcmd, , 0, 1
do while(not fragmentSQLrec.EOF)
Response.write(fragmentSQLrec("text"
)
Response.write(vbcrlf)
fragmentSQLrec.MoveNext
loop
fragmentSQLrec.Close
fragmentsSQLrec.MoveNext
loop
fragmentsSQLrec.Close
set MyConnection = Nothing
%>
</textarea>
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="Bodytext" rows="20" cols="62" style="font-family: Verdana, Arial">
<% set MyConnection = Server.createObject("ADODB.Connection"
MyConnection.Open Application("DataBaseConnection"
Set fragmentsSQLcmd = Server.CreateObject("ADODB.Command"
Set fragmentsSQLcmd.ActiveConnection = MyConnection
Set fragmentsSQLrec = Server.CreateObject("ADODB.Recordset"
fragmentsSQLcmd.CommandText = "Select * from EMAILPageFragments where idpage = " & Status & " ORDER BY EMAILPageFragments.postionOnPage"
fragmentsSQLcmd.CommandType = 1
fragmentsSQLrec.Open fragmentsSQLcmd, , adOpenDynamic, 1
do while (not fragmentsSQLrec.EOF)
Set fragmentSQLcmd = Server.CreateObject("ADODB.Command"
Set fragmentSQLcmd.ActiveConnection = MyConnection
Set fragmentSQLrec = Server.CreateObject("ADODB.Recordset"
fragmentSQLcmd.CommandText = "Select * from EMAILfragment where id = " & fragmentsSQLrec("idfragment"
fragmentSQLcmd.CommandType = 1
fragmentSQLrec.Open fragmentSQLcmd, , 0, 1
do while(not fragmentSQLrec.EOF)
Response.write(fragmentSQLrec("text"
Response.write(vbcrlf)
fragmentSQLrec.MoveNext
loop
fragmentSQLrec.Close
fragmentsSQLrec.MoveNext
loop
fragmentsSQLrec.Close
set MyConnection = Nothing
%>
</textarea>