before learning asp, first learn and use vbscript, (read the documentation) and tutorials. for asp tutorials, you can try following sites:
http://www.asp101.com
http://www.aspin.com
http://www.aspfaqs.com
http://www.4guysfromrolla.
feel free to post your problems at EE.
happy programming !!
Main Topics
Browse All Topics





by: lavinderPosted on 2003-03-15 at 04:26:39ID: 8142303
hi
, strAField, strBField)
try this
FUNCTION AddTextListOption(strValue
Dim strCompiled
SplitPoint = 50
strCompiled = "<option value=""+ strValue +"">"
'
'SET THE RIGHT LENGTH FOR THE 1st HALF
'
If Len(strAField) > SplitPoint then 'cut it at SplitPoint
strAField = left(strAField, SplitPoint)
ElseIf Len(strAField) < SplitPoint then
charcount = SplitPoint - Len(Value)
for i = 1 to (charcount - 1)
paddingA = paddingA & " "
next
strAField = strAField & paddingA
End If
'
'NOW THE SECOND HALF
'
If Len(strBField) > SplitPoint then 'cut it at SplitPoint
strBField = left(strBField, SplitPoint)
ElseIf Len(strBField) < SplitPoint then
charcount = SplitPoint - Len(Value)
for i = 1 to (charcount - 1)
paddingB = paddingB & " "
next
strBField = strBField & paddingB
End If
strCompiled = strDesc & strAField & strBField & "</option>" 'the complete option string
AddTextListOption = strCompiled
End Function