Forum Moderators: open
I need to include the top 5 releases on this page - "where it says Press releases on the right" <snip> -- I know I can do a file include, but of course, it doesn't work with the asp query.
Anyone know how to accomplish this? Remember, I am not that advanced in ASP
Many thanks!
[edited by: Woz at 10:58 pm (utc) on April 19, 2006]
[edit reason] No URLs please, see TOS#13 [/edit]
to show up on this page - <snip> where it says "need top 5 press releases to show up here"
I've solved sorting out the 5. I know that the asp?catid=21 select doesn't work using a file include...how do I make it work..?
Thanks!
[edited by: Woz at 10:59 pm (utc) on April 19, 2006]
Getting the top five news releases is really as simple as querying your database and looping through the records on your default page. Do you know how to do this?
If you want to use an include file, you do not have to pass the variables through a querystring. You can hard code the variables that would be passed at the top of the code in your include file. Your variables shouldn't change for what you need them for.
Make a copy of file <snip> and name it NewsInclude.asp or whatever. At the top of this page add the following line of code:
catid=21
This will hard code the variable you were originally passing through the query string. If no errors are generated from possible issues mentioned earlier, this should allow you to use the file as a include.
You can now call the include file without a querystring:
<!-- #include file="NewsInclude.asp" -->
I also suggest you review some very basic ASP principles. These websites will help.
[w3schools.com...]
[4guysfromrolla.com...]
[asp101.com...]
[edited by: Woz at 11:00 pm (utc) on April 19, 2006]