Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Sending Parameters to another page


Message #1 by "Arsalan" <arsal21@y...> on Mon, 21 May 2001 11:35:10
i am working on a Real Estate Agency as a final year project of my degree.

i am displaying results from Access databse according to users selections 

about particulat property types. 

i need to display the pictures of the property along with the search 

results. The format i have decided is that the results are displayed along 

with a hyperlink on some field and the users can click that hyperlink to 

view the pictures of that property. The image display is working properly.

The problem is that how is send parameter in a <href> to another page (say 

pic.asp) where the pictures of that particular property would be displayed.

pls help me in this regard.
Message #2 by Roger Weijmer <roger@w...> on Mon, 21 May 2001 13:08:57 GMT
Hi try this



<a href="pic.asp?id=<%=recset("id")%>">picture</a>



If the picture comes from a recordset in other way just



<a href="pic.asp?id=<%=("id")%>">picture</a>



> i am working on a Real Estate Agency as a final year 

project of my degree.

> i am displaying results from Access databse according to 

users selections 

> about particulat property types. 

> i need to display the pictures of the property along with 

the search 

> results. The format i have decided is that the results 

are displayed along 

> with a hyperlink on some field and the users can click 

that hyperlink to 

> view the pictures of that property. The image display is 

working properly.

> The problem is that how is send parameter in a <href> to 

another page (say 

> pic.asp) where the pictures of that particular property 

would be displayed.

> pls help me in this regard.

> 

Message #3 by "Charles Feduke" <webmaster@r...> on Mon, 21 May 2001 10:15:20 -0400
	This is actually a common question.



	Are you storing the images in the database, or on the server's file system

(preferably the latter)?  I will assume the file system.



	Basically if you have unique identifer for each site, then you either have

the pictures setup in such a way that they are named to that unique id (for

example: 1.jpg, 2.jpg, 3.jpg and so forth) or you retain the name of the

image in the actual database (this is not recommended because you may get

name clashes).  So all it comes down to is creating a link like so:



<A HREF="some_dir/pic.asp?id=<%=iYourSiteID%>">Click here for a picture</A>



	Then in pic.asp:



<IMG SRC="images/<%=Request.QueryString("id")%>.gif">



	Of course you really don't even need a link at this point; you could just

display the picture if it is small (or thumbnail it and link it directly to

the picture if it is large).



	Hopefully I interpreted your question correctly.



? Chuck



> -----Original Message-----

> From: Arsalan [mailto:arsal21@y...]

> Sent: Monday, May 21, 2001 11:35 AM

> To: ASP Databases

> Subject: [asp_databases] Sending Parameters to another page

>

>

> i am working on a Real Estate Agency as a final year project of my degree.

> i am displaying results from Access databse according to users selections

> about particulat property types.

> i need to display the pictures of the property along with the search

> results. The format i have decided is that the results are

> displayed along

> with a hyperlink on some field and the users can click that hyperlink to

> view the pictures of that property. The image display is working properly.

> The problem is that how is send parameter in a <href> to another

> page (say

> pic.asp) where the pictures of that particular property would be

> displayed.

> pls help me in this regard.

> 


  Return to Index