"Sparky Arbuckle" <tw*@secureroot.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
Hey Jim &vbCrlf this is &vbCrlf how!
Looks like:
Hey Jim
this is
how!
I understand the vbCrLf syntax and have used it in VB6 and VB.NET.
My problem has to do with putting the propery paragraphs in HTML from vb.
I'll give you a coding exampe:
------------------------------------------------------------------------
Protected Sub btnTransfer_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnTransfer.Click
Dim strConnection, strSQLTransfer, strSQL, strSQLNote, strResults,
strSQLRemove, txtID As String
Dim objConnection As OleDbConnection
Dim objCommand As OleDbCommand
Dim objDataReader As OleDbDataReader
txtISNotes.Text = Replace(txtISNotes.Text, "'", "''")
txtID = txtTransfer.Text
strResults = ""
strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
"e:\hhsinternal\cterrorlog\ctprob.mdb"
strSQL = "SELECT ID, ClientID, Field, Form, Employee, username," & _
" ip, probdt, Descript, isnotes, noshow FROM TProblem" & _
" WHERE ((TProblem.noshow)= NO) ORDER BY ID DESC;"
strSQLTransfer = "INSERT INTO TClaimTrak (ID, ClientID, Form, Field,
Descript, "
strSQLTransfer += "Employee, username, isnotes) "
strSQLTransfer += "SELECT TProblem.ID, TProblem.ClientID,
TProblem.Form, TProblem.Field, "
strSQLTransfer += "Tproblem.Descript, TProblem.Employee,
Tproblem.username, TProblem.isnotes "
strSQLTransfer += "FROM TProblem "
strSQLTransfer += "WHERE TProblem.ID=" & txtID & ";"
strSQLNote = "UPDATE TProblem"
strSQLNote += " Set isnotes = '" & txtISNotes.Text & "'"
strSQLNote += " WHERE id = " & txtID & ";"
strSQLRemove = "UPDATE TProblem"
strSQLRemove += " Set noshow = True"
strSQLRemove += " WHERE id = " & txtTransfer.Text & ";"
objConnection = New OleDbConnection(strConnection)
objConnection.Open()
If Not txtISNotes.Text = "" Then
objCommand = New OleDbCommand(strSQLNote, objConnection)
objCommand.ExecuteNonQuery()
End If
objCommand = New OleDbCommand(strSQLTransfer, objConnection)
objCommand.ExecuteNonQuery()
objCommand = New OleDbCommand(strSQLRemove, objConnection)
objCommand.ExecuteNonQuery()
objCommand = New OleDbCommand(strSQL, objConnection)
objDataReader = objCommand.ExecuteReader()
Do While objDataReader.Read() = True
strResults += "<table cellpadding=""5"" cellspacing=""0""
border=""1"" bordercolor=""maroon"" width=""90%""><tr>"
strResults += "<td bgcolor=""red"" width=""10%""><b>ID:<br
/><font color=""white"">" & objDataReader("ID").ToString &
"</font></b></td>"
strResults += "<td bgcolor=""silver"" width=""30%""><b>Client
ID:</b><br />" & objDataReader("ClientID").ToString & "</td>"
strResults += "<td bgcolor=""silver""
width=""30%""><b>Field:</b><br />" & objDataReader("Field").ToString &
"</td>"
strResults += "<td bgcolor=""silver""
width=""30%""><b>Form:</b><br />" & objDataReader("Form").ToString & "</td>"
strResults += "</tr><tr>"
strResults += "<td bgcolor=""silver"" width=""10%""><b>Employee
Name:<br /><font color=""navy"">" & objDataReader("Employee").ToString &
"</font></b></td>"
strResults += "<td bgcolor=""silver""
width=""30%""><b>Username:</b><br />" & objDataReader("username").ToString &
"</td>"
strResults += "<td bgcolor=""silver"" width=""30%""><b>IP
Address:</b><br />" & objDataReader("ip").ToString & "</td>"
strResults += "<td bgcolor=""silver""
width=""30%""><b>Date/Time:</b><br />" & objDataReader("probdt").ToString &
"</td>"
strResults += "</tr><tr>"
strResults += "<td colspan=""4""><b>Description:</b><br />" &
objDataReader("Descript").ToString & "</td>"
strResults += "</tr><tr>"
strResults += "<td colspan=""4""><b>HHS Info Systems
Notes:</b><br />" & objDataReader("isnotes").ToString & "<br /></td>"
strResults += "</tr></table>"
strResults += "<br />"
Loop
objDataReader.Close()
objConnection.Close()
report.InnerHtml = strResults
txtTransfer.Text = ""
txtISNotes.Text = ""
End Sub
------------------------------------------------------------------------
I copied and pasted that from one of the pages I'm referring to. What
happens is when someone types into a textbox and clicks the button, that
text is placed into a memo field in an Access database. Then, that note is
redrawn to the browser with HTML. If the person had pressed the ENTER button
a few times and began a new paragraph in the text box, that new paragraph
will not show up when the note is rewritten to the browser. There is only a
single space instead of new blank lines. If they click another button that
loads the note back into a textbox, the text that they typed is in its
original format, with the blank lines. So, it looks like the database is
keeping the original format, but the HTML stream is not writing those extra
lines.
So, how do I get around this?
Thanks,
Jim