Running ASP pages offline on any machine

C

Carl Gilbert

Hi

I have a few asp pages that I plan to burn to a CD so the pages can be
navigated without an internet connection. I have just realised that the
pages might not run that well, if at all, as they contain ASP script.

Firstly, do the code snippets I have attached at the bottom of this post
contain any non ASP code (i.e. ASP.NET code)?

Secondly, what is the best method for getting the pages to run straight from
disk? I have found this site:
http://www.eztools-software.com/tools/hsp/default.asp but wanted to see if
there was any better ideas out there.

Regards, Carl Gilbert





<%

spacer = "images\misc\spacer.gif"
filler = "images\misc\filler.gif"
line_end = "images\misc\line_end.gif"
btn_previous = "images\misc\previous.gif"
btn_next = "images\misc\next.gif"
btn_contents = "images\misc\contents.gif"
btn_summary = "images\misc\summary.gif"


int_g = request.QueryString("g")
int_sg = request.QueryString("sg")
int_sgmax = request.QueryString("sgmax")
int_i = request.QueryString("i")
int_imax1 = request.QueryString("imax1")
int_imax2 = request.QueryString("imax2")

int_g = CInt(int_g)
int_sg = CInt(int_sg)
int_sgmax = CInt(int_sgmax)
int_i = CInt(int_i)
int_imax1 = CInt(int_imax1)
int_imax2 = CInt(int_imax2)

'set the max number of images based on the sub group
If int_sg = 1 Then
int_mymax = int_imax1
Else
int_mymax = int_imax2
End If

'b1 = previous
'b2 = next
'b3 = contents
'b4 = summary

If int_i = 0 Then
'we are dealing with a group

'set the previous button
If int_sg > 1 Then b1 = 80 Else b1 = 0

'set the next button
If Not int_sg = int_sgmax Then s1 = 10 Else s1 = 0
If Not int_sg = int_sgmax Then b2 = 80 Else b2 = 0

Else
'We are dealing with an image

'set the previous button
If int_i > 1 Then b1 = 80 Else b1 = 0

'set the next button
If Not int_i = int_mymax Then s1 = 10 Else s1 = 0
If Not int_i = int_mymax Then b2 = 80 Else b2 = 0

End If

'set the contents button
If Not int_i = 0 Then s2 = 10 Else s2 = 0
If Not int_i = 0 Then b3 = 80 Else b3 = 0

'set the summary button
If Not int_g = 0 Then s3 = 10 Else s3 = 0
If Not int_g = 0 Then b4 = 80 Else b4 = 0

h1 = 620 - (b1+s1+b2+s2+b3+s3+b4)

%>

<% If int_i = 0 Then %>
<TABLE width="800" height="533" border="0" align="center" cellpadding="0"
cellspacing="0" id="Table2" STYLE="border: 2 ridge #800000">
<% Else %>
<TABLE width="800" height="533" border="0" align="center" cellpadding="0"
cellspacing="0" id="Table3" STYLE="background-image:
url(images\bulk\g<%=int_g%>sg<%=int_sg%>i<%=int_i%>.jpg); border: 2 ridge
#800000">
<% End If %>


<% For x = 1 To 7
If x <= int_mymax Then %>
<TD width="80" height="80">
<A
href="ShowImage.asp?g=<%=int_g%>&sg=<%=int_sg%>&sgmax=<%=int_sgmax%>&i=<%=x%>&imax1=<%=int_imax1%>&imax2=<%=int_imax2%>">
<IMG src="images\thumbs\th_g<%=int_g%>sg<%=int_sg%>i<%=x%>.jpg"
width="100%" height="100%" border="0">
</A>
</TD>
<% Else %>
<TD width="80" height="80"><IMG src="<%=spacer%>" width="100%"
height="100%" border="0"></TD> <% End If %>
<% If Not x = 7 Then %>
<TD width="10"><IMG src="<%=spacer%>" width="10"></TD>
<% End If %>
<% Next %>
 
G

Guest

I do not have the URL, but www.asp.net had a sample with their "Cassini"
server that could run an ASP.NET application from a CD. The "server" would
boot up off the CD and serve pages. Very neat.

For traditional ASP, there are third party tools for doing this. I do not
believe Cassini will serve up traditional ASP.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
C

Carl Gilbert

Lucas Tam said:
Your code looks pretty straight forward... why not convert it to
Javascript?

Hi, cheers for the reply

I suppose that could be an option, the only problem is that I know virtually
no java script.

Would it just be a case of swapping out the code for similar JavaScript?
What I am doing is providing a grid of thumb nails and then allowing the
user to click on the image which then displays it full size. The user can
then navigate through the images.

I am then using the query string to state how many images are available in
each group and therefore determine how many thumb nails to show and then
using the loop through the images to build up the URL for each large image.

In fact I would rather just try and get the ASP code to run from disk rather
than re-engineer the code if the end result is going to be the same.

Let me know if you want a more complete post of my code if you think that
JavaScript will be vastly easier to implement with minimal re-engineering.

Regards, Carl
 
L

Lucas Tam

Hi, cheers for the reply

I suppose that could be an option, the only problem is that I know
virtually no java script.

Would it just be a case of swapping out the code for similar
JavaScript? What I am doing is providing a grid of thumb nails and
then allowing the user to click on the image which then displays it
full size. The user can then navigate through the images.

More or less yes - I would go with the Javascript route because:

1. Javascript is built into IE
2. Security restrictions on the client side may prevent the ASP plugin
from being loaded
3. Javascript is "free" : )


Let me know if you want a more complete post of my code if you think
that JavaScript will be vastly easier to implement with minimal
re-engineering.

Javascript will definately be easier to deploy.

The only advantage ASP would have is in database access - you can't
really do that with Javascript.

In anycase, give Javascript a go - if you're a decent programmer, it
won't take you long to learn javascript (maybe a couple days... or a
week).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top