cxvxc
11-06-2003, 05:56 AM
i have a a list of lines(text) named as desciption field in the database. i want to have it displayed on my page line by line.i.e one line after another and also the text field being validated to 8o characters..
either using asp or using javascripts
please can u help me
rdoekes
11-06-2003, 06:56 AM
Displaying line by line can be done with a replacement
Response.Write Replace(oRs("Description"), vbCrLf, "<br/>" & vbcrlf )
If you mean by validating the text, truncating you could use this code:
Dim strOutput
Dim intLength
strOutput = oRs.Description
intLength = Len(strOutput)
If intLength > 80 Then
Response.Write Mid(strOutput, 1, intLength)
ELse
Response.Write Mid(strOutput, 1)
End If
Hope this is what you are looking for
-Rogier Doekes