Asp > Techniques
Dividing a long string to pages
Dividing a long string to pages function pageString(str,Nrow)'the string to act upon and number of rows in page--- this function cuts a string to "pages"=divs res="
"'result string rowsRA=split(str,"
") pgI=0'page counter- counts the number of pages the string was divided to i=0 for each row in rowsRA 'alert (i) if (i mod Nrow=0) and (not i< Nrow) then res=res&"
" if (pgI-1)>=0 then res=res&"
" end if res=res&"
" pgI=pgI+1 res=res&"
"&chr(13)&"
"&chr(13) end if res=res&rowsRA(i)&"
"&chr(13) i=i+1 next res=res&"
" res=res&chr(13)&"
"&chr(13) pageString=res end function
Asp Codes
ActiveX
ADO
Array
Code Snippets
Components
Data Access
Date Time
Files
Graphics
HTML Formatting
Mathematics
Miscellaneous
Sessions
SQL
Strings
Techniques
XML