This topic is locked

How To Truncate Fields Manually

1/21/2010 1:19:50 PM
ASPRunnerPro Tips and tricks
S
stealthwifi author

If you have trunctaion turned on in the Misc part of the Editor but want one or multiple fields to have different settings here is an easy way to do it:
Add a custom view for the filed on the List page of the visual editor, use the below code, modify to fit your fields:



IF strValue <> "" then

strValue = "<A href='http://websiteurl.com/pagename_fulltext.asp?field=FieldName&key1="'>http://websiteurl.com/pagename_fulltext.asp?field=FieldName&key1=" & rs("ColumnID") & "' target='_blank'>More ...</A>"

else

''

end if


replace 'http://websiteurl.com with your site's address

replace pagename with the name of your page (ex if page is allison_list.asp then allison)

replace FieldName with the field name this applies to

replace More ... with whatever you want the link to say (you can also add some fancy code here to truncate the text rather than have static text