For Programmers: Free Programming Magazines  


Home > Archive > ASP > June 2007 > divide long web page









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author divide long web page
LaiLakY

2007-06-30, 3:56 am

Hi all
I want to divide long HTML page (paging) into smaller pages.
I know how to do it if I use recordset but in my project, I dont need
to read from a Database, I'm reading a file system wich is a folder
and list all files insid it

Any idea Plaese
THANKS

Evertjan.

2007-06-30, 3:56 am

LaiLakY wrote on 30 jun 2007 in microsoft.public.inetserver.asp.general:

> Hi all
> I want to divide long HTML page (paging) into smaller pages.
> I know how to do it if I use recordset but in my project, I dont need
> to read from a Database,



try:

<html>
<head>
......
</head>
<body>
<%
if request.querystring("part")=1 then
%>
...............
<%
end if
if request.querystring("part")=2 then
%>
...............
<%
end if
if request.querystring("part")=3 then
%>
...............
<%
else ' part 4 is default
%>
...............
<%
end if
%>
</body>
</html>

> I'm reading a file system wich is a folder
> and list all files insid it


Don't we all?
Is this relevant to your Q?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
LaiLakY

2007-06-30, 3:56 am


Evertjan.:> try:
>
> <html>
> <head>
> .....
> </head>
> <body>
> <%
> if request.querystring("part")=1 then
> %>
> ..............
> <%
> end if
> if request.querystring("part")=2 then
> %>
> ..............
> <%
> end if
> if request.querystring("part")=3 then
> %>
> ..............
> <%
> else ' part 4 is default
> %>
> ..............
> <%
> end if
> %>
> </body>
> </html>
>

Thanks Evertjan
Your Idea is great but I have loop and I want after Iisting each 'say
20 files' then the next will be in new page and so on

> Don't we all?
> Is this relevant to your Q?

Thanks, for this i'm doing well.

Evertjan.

2007-06-30, 7:55 am

LaiLakY wrote on 30 jun 2007 in microsoft.public.inetserver.asp.general:



[..][color=darkred]
> Thanks Evertjan
> Your Idea is great but I have loop and I want after Iisting each 'say
> 20 files' then the next will be in new page and so on


So you want a [clickable] file listing using the filesystemobject
and know how to get the list of files in an array?

then do:

<%
' arr is filled by filesystemobject
' s is start position in arr

for i=s to s+20
%>
<a href='<%=arr(i)%>'><%=arr(i)%></a><br>
<%
next
%>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
LaiLakY

2007-06-30, 6:56 pm

THANK YOU SO MUCH
Evertjan

I used IF statment and it's work very nice

THANKS AGAIN

Kind Regards
LaiLakY

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com