1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Need help linking image to virtual brochure

Discussion in 'C#' started by tmckee, Sep 22, 2007.

  1. #1
    Hi,
    I am working on a realestate site that has a detail page (http://www.affluenthomeusa.com/detail.asp?ad_ID=37) that details the listing.
    On the detail.asp is a picture of the house (all generated by the database) I need to be able to click on the image of the listing and have it open a virtual brochure (http://www.affluenthomeusa.com/bro/37/) that I build manually. Currently it is written to view all the images of the house with a page called view_pics.asp.
    Here is an example of the code that does that:
    <tr>
    <td width="150" height="150" align="center" bgcolor="#CCCCCC"><p align="center">
    <% If (rsAd.Fields.Item("image1_uploaded").Value) = "True" Then %>
    <a href="view_pics.asp?ad_ID=<%= Request.QueryString("ad_ID") %>" target="_blank"><img src="<%= strPictureURL %>/Ad_<%=(rsAd.Fields.Item("ad_ID").Value)%>_1.<%=(rsAd.Fields.Item("image1_fileextension").Value)%>" border="0"></a><br>
    <% Else %>
    <img src="" width="150" height="150" alt="No Pics Available" style="background-color: #CCCCCC"><br>
    <% End If %>
    <span class="style2"><%=(rsAd.Fields.Item("ad_address").Value)%></span></p></td></tr>
    </table>

    </td>
    </tr>
    I uploaded the detail.asp as a text file here: http://www.affluenthomeusa.com/detail.txt and the MS Access Database here in a zip file: http://www.affluenthomeusa.com/dbase.zip. I have access to the MS Access database and know how to add a record. I just don't know how to change the code in the asp and what to write in the db. I understand that I might need to make manual entries into the db whenever I add a listing. I'm OK with that. I can also name the virtual brochure anything I want.
    Can anyone help?
    Please email me for clarification so that I can send links to the project and the database. thomas@thomasckee.com
     
    tmckee, Sep 22, 2007 IP
  2. Sellertools

    Sellertools Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I am still looking at your code, but here is one hint for you;

    from your code:

    rsCat.Open()
    rsCat_numRows = 0
    %>
    <%

    Dim rsCity__MMColParam

    You dont need to, and in fact dont WANT to, keep closing your statements with the %>.

    Everytime you do that, processing is handed BACK to IIS from the ASP interpreter. This just wastes time and resources. If you look at your code and think about the fact that everytime you use a %>, the whole page is sent back to IIS, only to be sent BACK to the asp interpreter everytime a <% is encountered, you can see how many trips it is making.

    Make sense?
     
    Sellertools, Oct 14, 2007 IP