Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 288
  • Last Modified:

How can I pass information from one page to another?

I'll try to break it down. When a user clicks on a link from this page:

http://localhost/flagfootball/updateimagescroller.asp

I want to be able to store the pic name they clicked on (pic1, pic2, pic3, etc) in an ASP variable called "picnumber" on this page:

http://www.glowfishtw.com/flagfootball/updateimagescrollerbrowse.asp

Can someone explain to me how to do this? Do I pass the info in the URL name? or is there a better wat of going about this? Thanks for any help. I've included the code from my pages.
Link page
 
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
	font: 100% Verdana, Arial, Helvetica, sans-serif;
	background: #666666;
	margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
	padding: 0;
	text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
	color: #000000;
}
.oneColElsCtr #container {
	width: 80%;
	background: #FFFFFF; /* the auto margins (in conjunction with a width) center the page */
	border: 1px solid #000000;
	text-align: center; /* this overrides the text-align: center on the body element. */
	margin-top: 0;
	margin-right: auto;
	margin-bottom: 0;
	margin-left: auto;
}
.oneColElsCtr #mainContent {
	padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
}
.style1 {
	font-size: 12px;
	font-weight: bold;
}
-->
</style>
</head>
 
<body class="oneColElsCtr">
 
<div id="container">
  <div id="mainContent">
    <h1>Update Image Scroller</h1>
    <p>current images:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
    <table width="80%" border="0">
      <tr>
        <td><img src="scroller_images/pic1.jpg" height="60" /></td>
        <td><img src="scroller_images/pic2.jpg" height="60" /></td>
        <td><img src="scroller_images/pic3.jpg" height="60" /></td>
        <td><img src="scroller_images/pic4.jpg" height="60" /></td>
        <td><img src="scroller_images/pic5.jpg" height="60" /></td>
        <td><img src="scroller_images/pic6.jpg" width="60" height="60" /></td>
        <td><img src="scroller_images/pic7.jpg" width="60" height="60" /></td>
        <td><img src="scroller_images/pic8.jpg" width="60" height="60" /></td>
        <td><img src="scroller_images/pic9.jpg" width="60" height="60" /></td>
        <td><img src="scroller_images/pic10.jpg" width="60" height="60" /></td>
      </tr>
      <tr>
        <td><div align="center" class="style1"><a href="updateimagescrollerbrowse.asp">pic 1</a></div></td>
        <td><div align="center" class="style1"><a href="updateimagescrollerbrowse.asp">pic 2</a></div></td>
        <td><div align="center" class="style1"><a href="updateimagescrollerbrowse.asp">pic 3</a></div></td>
        <td class="style1"><div align="center"><a href="updateimagescrollerbrowse.asp">pic 4</a></div></td>
        <td><div align="center" class="style1"><a href="updateimagescrollerbrowse.asp">pic 5</a></div></td>
        <td><div align="center" class="style1"><a href="updateimagescrollerbrowse.asp">pic 6</a></div></td>
        <td><div align="center" class="style1"><a href="updateimagescrollerbrowse.asp">pic 7</a></div></td>
        <td><div align="center" class="style1"><a href="updateimagescrollerbrowse.asp">pic 8</a></div></td>
        <td><div align="center" class="style1"><a href="updateimagescrollerbrowse.asp">pic 9</a></div></td>
        <td><div align="center" class="style1"><a href="updateimagescrollerbrowse.asp">pic 10</a></div></td>
      </tr>
    </table>
    <!-- end #mainContent --></div>
<!-- end #container --></div>
</body>
</html>
 
 
 
 
 
Variable page
 
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
	font: 100% Verdana, Arial, Helvetica, sans-serif;
	background: #666666;
	margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
	padding: 0;
	text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
	color: #000000;
}
.oneColElsCtr #container {
	width: 46em;
	background: #FFFFFF;
	margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
	border: 1px solid #000000;
	text-align: left; /* this overrides the text-align: center on the body element. */
}
.oneColElsCtr #mainContent {
	padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
}
-->
</style></head>
 
<body class="oneColElsCtr">
 
<%
Dim picnumber
picnumber = 'what goes here?
%>
 
<div id="container">
  <div id="mainContent">
    <h1>Upload a new image for </h1>
    <form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
      <label>
      <input name="fileField" type="file" id="fileField" size="50" />
      </label>
                <br />
                <br />
                <label>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input type="submit" name="button" id="button" value="upload" />
      </label>
    </form>
    <p>
      <!-- end #mainContent -->
    </p>
    </div>
<!-- end #container --></div>
</body>
</html>

Open in new window

0
elliottbenzle
Asked:
elliottbenzle
  • 2
1 Solution
 
GawaiCommented:
IN FIRST PAGE,
change
<a href="updateimagescrollerbrowse.asp">Pic 1
to
<a href="updateimagescrollerbrowse.asp?picID=1"> Pic 1

get that id in second page by


dim picid = Request.QueryString("picID")

response.write(picid)

0
 
GawaiCommented:
sorry it would be
dim picid
picid= Request.QueryString("picID")
response.write(picid)

in your case,
<%
Dim picnumber
picnumber = Request.QueryString("picID")
response.write(picnumber)
%>
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now