Layout and ASP with DB

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Layout and ASP with DB

    Hello all,

    I have a question, here is my situation. I am using a SQL
    Server database and ASP to display the front page of a
    website. Now this front page is generated from the
    content of the database, it is an article management
    system. When users go to the front page, they will see
    all the articles that exist in the database, the titles
    and 100 characters of the body only, so if they click the
    title or the body, it opens up the entire article in
    another window. Now this frontpage has a two column
    layout ex:

    title1 title2
    body2 body2

    Here is where the problem exist, if I have three articles
    how can I display it like this:

    title1 title2
    body1 body2

    title3
    body3

    Should I use x=mod/2, if x =0 then print to the right,
    else print to the left or something similiar? How would I
    account the empty column where title4 and body4 should be?

    Do you count the articles first then based on the number
    of articles divide it by 2 or what? Any and all help
    would be appreciated.
    Mike Guest

  2. Similar Questions and Discussions

    1. CSS Layout
      Hello, can anybody tell me if it's more difficult (or not) to administer a site with Contribute if that site is built using CSS-positioned DIVs? ...
    2. CSS layout help
      Hello, all. I have a page here with some placeholder text in it: http://student.uncw.edu/org/bahaiclub/. The problem is with the #links <div> on...
    3. PS CS layout
      When I launch PS CS on my Mac PowerBook G4, I get the menus, tools & palates....but the work area is not grey... its my desktop. My desktop appears...
    4. [Q] LAyout & FM Pro
      I've created a portal that spans over several pages. I wish the layout view offered a bit more flexibility than what seems currently the case. ...
    5. Q: layout id
      Can one change the layout id number? Currently I have two layouts ( id 6 and 7 ). Using instant web publisher, the search results, when clicked,...
  3. #2

    Default Re: Layout and ASP with DB

    Use mod within your loop. You shouldn't have to adjust this code very much
    to fit your needs:
    [url]http://www.aspfaq.com/2247[/url]





    "Mike" <anonymous@discussions.microsoft.com> wrote in message
    news:001501c3a7a5$8bf27130$a301280a@phx.gbl...
    > Hello all,
    >
    > I have a question, here is my situation. I am using a SQL
    > Server database and ASP to display the front page of a
    > website. Now this front page is generated from the
    > content of the database, it is an article management
    > system. When users go to the front page, they will see
    > all the articles that exist in the database, the titles
    > and 100 characters of the body only, so if they click the
    > title or the body, it opens up the entire article in
    > another window. Now this frontpage has a two column
    > layout ex:
    >
    > title1 title2
    > body2 body2
    >
    > Here is where the problem exist, if I have three articles
    > how can I display it like this:
    >
    > title1 title2
    > body1 body2
    >
    > title3
    > body3
    >
    > Should I use x=mod/2, if x =0 then print to the right,
    > else print to the left or something similiar? How would I
    > account the empty column where title4 and body4 should be?
    >
    > Do you count the articles first then based on the number
    > of articles divide it by 2 or what? Any and all help
    > would be appreciated.

    Aaron Bertrand [MVP] Guest

  4. #3

    Default Re: Layout and ASP with DB

    Mike wrote:
    >...
    > Here is where the problem exist, if I have three articles
    > how can I display it like this:
    >
    > title1 title2
    > body1 body2
    >
    > title3
    > body3
    >
    > Should I use x=mod/2, if x =0 then print to the right,
    > else print to the left or something similiar? How would I
    > account the empty column where title4 and body4 should be?
    >
    > Do you count the articles first then based on the number
    > of articles divide it by 2 or what? Any and all help
    > would be appreciated.
    This seems like a CSS question:

    div.artical{
    float:left;
    width:48%;
    }

    --
    William Tasso - [url]http://WilliamTasso.com[/url]


    William Tasso Guest

  5. #4

    Default Re: Layout and ASP with DB

    Excellent, thanks!
    >-----Original Message-----
    >Use mod within your loop. You shouldn't have to adjust
    this code very much
    >to fit your needs:
    >[url]http://www.aspfaq.com/2247[/url]
    >
    >
    >
    >
    >
    >"Mike" <anonymous@discussions.microsoft.com> wrote in
    message
    >news:001501c3a7a5$8bf27130$a301280a@phx.gbl...
    >> Hello all,
    >>
    >> I have a question, here is my situation. I am using a
    SQL
    >> Server database and ASP to display the front page of a
    >> website. Now this front page is generated from the
    >> content of the database, it is an article management
    >> system. When users go to the front page, they will see
    >> all the articles that exist in the database, the titles
    >> and 100 characters of the body only, so if they click
    the
    >> title or the body, it opens up the entire article in
    >> another window. Now this frontpage has a two column
    >> layout ex:
    >>
    >> title1 title2
    >> body2 body2
    >>
    >> Here is where the problem exist, if I have three
    articles
    >> how can I display it like this:
    >>
    >> title1 title2
    >> body1 body2
    >>
    >> title3
    >> body3
    >>
    >> Should I use x=mod/2, if x =0 then print to the right,
    >> else print to the left or something similiar? How
    would I
    >> account the empty column where title4 and body4 should
    be?
    >>
    >> Do you count the articles first then based on the number
    >> of articles divide it by 2 or what? Any and all help
    >> would be appreciated.
    >
    >
    >.
    >
    Mike Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139