locked
Viewing Single Record Details RRS feed

  • Question

  • User-1655673003 posted

    Hi Guys,

    Over the last couple of weeks, i've been playing around with expression web to try and update our current company website: http://www.goodwinmachinery.co.uk

    Basically, our site is quite simple. We have individual product categories that are displayed and then the user can click through to view the individual product specification and pictures of said product.

    I've created the category pages and inserted hyperlink fields  to link to the individual product pages which works fine.

    The problem i'm having is getting the specification and pictures to display on the product pages.

    I'm literally tearing my hair out as i'm quite new to this.

    The access database i'm using has the following fields, ProductID, CategoryID, Description, Comments (This is the Specification field) and then Image1, Image2, Image3 etc all the way up to image 10. 

    What i've been trying to do is to use an imagefield within a gridview to pull the Image name from the image fields and then display said images from the images folder. I have got this to work of a fashion, yet all the images are displaying instead of the particular product images only. I believe i need to add a query string to do this yet i'm totally at a loss as to how to set this up... 

    I'm also having the same problem with the specification (comments field) as i can't figure out how to only display the individual product spec...

    If anybody could potentially help to point me in the right direction, it would be much appreciated... 

    P.S Apologies for the long winded post... 

    Thanks again in advance guys!! Smile

    Chris


    Tuesday, September 7, 2010 6:20 AM

Answers

  • User-1199946673 posted

    Over the last couple of weeks, i've been playing around with expression web to try and update our current company website: http://www.goodwinmachinery.co.uk

    This website is build in Classic ASP (*.asp), not in ASP.NET (*.aspx). Since these forums are intended for ASP.NET related questions only, you need to find another forum to ask your question.

    If you want to build a new ASP.NET website, use Visual Studio Express (download for free), not Expression Web

     

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 7, 2010 7:52 AM

All replies

  • User-1199946673 posted

    Over the last couple of weeks, i've been playing around with expression web to try and update our current company website: http://www.goodwinmachinery.co.uk

    This website is build in Classic ASP (*.asp), not in ASP.NET (*.aspx). Since these forums are intended for ASP.NET related questions only, you need to find another forum to ask your question.

    If you want to build a new ASP.NET website, use Visual Studio Express (download for free), not Expression Web

     

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 7, 2010 7:52 AM
  • User-1655673003 posted

    Thanks for the reply Hans_v

    I'm trying to create the new site in .aspx if that helps?

    I included the website as a reference so people could see what it looked like to get the idea.

    That site is over 10 years old now...

    Chris 

    Tuesday, September 7, 2010 7:57 AM
  • User-1199946673 posted

    That site is over 10 years old now...
     

    So I can seeWink

    Please try to ask specific questions. Show us the relevant code you've so far, so we can try to help you in the right direction

    Tuesday, September 7, 2010 8:54 AM
  • User-1655673003 posted

    Thanks Hans_v!!

    This is the code i have for the first category page which does work and links through to the individual page:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%@ Page Language="C#" %>
    <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>Untitled 1</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <asp:GridView id="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ProductID" DataSourceID="Extrusion">
    <Columns>
    <asp:BoundField DataField="ProductID" HeaderText="ProductID" ReadOnly="True" SortExpression="ProductID">
    </asp:BoundField>
    <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description">
    </asp:BoundField>
    <asp:HyperLinkField DataNavigateUrlFields="ProductID" DataNavigateUrlFormatString="extrusionspec.aspx?field={0}" HeaderText="Specification" Text="View Spec">
    </asp:HyperLinkField>
    </Columns>
    </asp:GridView>
    <asp:AccessDataSource ID="Extrusion" runat="server" DataFile="database\Copy of goodwinmachinery.mdb" SelectCommand="SELECT [ProductID], [Description] FROM [Products] WHERE ([CategoryID] = ?)">
    <SelectParameters>
    <asp:Parameter DefaultValue="1" Name="CategoryID" Type="Int32" />
    </SelectParameters>
    </asp:AccessDataSource>
    </form>
    </body>
    </html>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <%@ Page Language="C#" %>

    <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">


    <head runat="server">

    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

    <title>Untitled 1</title>

    </head>


    <body>


    <form id="form1" runat="server">

    <asp:GridView id="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ProductID" DataSourceID="Extrusion">

    <Columns>

    <asp:BoundField DataField="ProductID" HeaderText="ProductID" ReadOnly="True" SortExpression="ProductID">

    </asp:BoundField>

    <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description">

    </asp:BoundField>

    <asp:HyperLinkField DataNavigateUrlFields="ProductID" DataNavigateUrlFormatString="extrusionspec.aspx?field={0}" HeaderText="Specification" Text="View Spec">

    </asp:HyperLinkField>

    </Columns>

    </asp:GridView>

    <asp:AccessDataSource ID="Extrusion" runat="server" DataFile="database\Copy of goodwinmachinery.mdb" SelectCommand="SELECT [ProductID], [Description] FROM [Products] WHERE ([CategoryID] = ?)">

    <SelectParameters>

    <asp:Parameter DefaultValue="1" Name="CategoryID" Type="Int32" />

    </SelectParameters>

    </asp:AccessDataSource>

    </form>


    </body>


    </html>

    This is the code i've got so far for the product details page:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%@ Page Language="C#" %>
    <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">

    <head runat="server">
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>Untitled 1</title>
    </head>

    <body>

    <form id="form1" runat="server">
    <asp:GridView id="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="Extrusionpictures">
    <Columns>
    <asp:ImageField DataImageUrlField="Image1" DataImageUrlFormatString="images/{0}">
    </asp:ImageField>
    <asp:ImageField DataImageUrlField="Image2" DataImageUrlFormatString="images/{0}">
    </asp:ImageField>
    <asp:ImageField DataImageUrlField="Image3" DataImageUrlFormatString="images/{0}">
    </asp:ImageField>
    </Columns>
    </asp:GridView>
    <asp:AccessDataSource ID="Extrusionpictures" runat="server" DataFile="E:\Documents and Settings\Christopher Kay\Desktop\Goodwins\Goodwins\database\Copy of goodwinmachinery.mdb" SelectCommand="SELECT [ProductID], [Image1], [Image2], [Image3] FROM [Products] WHERE ([ProductID] = ?)">
    <SelectParameters>
    <asp:querystringparameter Type="Int32" DefaultValue="-1" Name="ProductID" QueryStringField="ProductID" />
    </SelectParameters>
    </asp:AccessDataSource>
    </form>

    </body>

    </html>

    I appreciate that they are only blank pages, yet obviously i've been trying to get this bit working first before i start creating the layouts etc...

    Thanks again!!

    Chris

    Tuesday, September 7, 2010 9:21 AM