Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Apr 2005
    Posts
    53
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Best way to serve up numerous articles?

    Hello all,
    I'm redesigning an asp site for an online magazine and am wondering what the best way to serve up the numerous articles would be. Currently; there are individual pages for each article. Each page uses includes for the nav, footer, and other elements used throughout the site. Is there a better/easier way?
    Thanks in advance,
    Anessa

  • #2
    Senior Coder
    Join Date
    Nov 2002
    Location
    North-East, UK
    Posts
    1,265
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Have one page called articles.
    Include your article content via a querystring.

    e.g. articles.asp?article_id=23

    Have database code in your file to output the article data from the database according to the querystring.

    Code:
    article_id = Request.QueryString("article_id")
    ' do some validation here. Trim, IsNumeric, InStr(" "), Replace '  '' etc.
    sql = "SELECT * FROM articles WHERE article_id = " & article_id


  •  

    Posting Permissions

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