Jump to content

ASP Include


vjr

Recommended Posts

Hi,I have an asp page which already includes other asp files such as the menu, header and footer.In this particular page, I want to have 4 sections of a particular image gallery. Is it possible to have a four links on the page to change the include file so it displays another page rather than create 4 seperate pages?For example:Main pictures page (pictures.asp)Page 1 has images 1-20 (imgs1.asp)Page 2 has images 21-40 (imgs2.asp)Page 3 has images 41-60 (imgs3.asp)All these shouldn't have to be created in seperate pages apart from just the gallery.So initially imgs1.asp is included in pictures.asp, but when you click on page 2, imgs1.asp will be replaced by imgs2.asp...Please help! Thank you

Link to comment
Share on other sites

  • 8 months later...
Hi,I have an asp page which already includes other asp files such as the menu, header and footer.In this particular page, I want to have 4 sections of a particular image gallery. Is it possible to have a four links on the page to change the include file so it displays another page rather than create 4 seperate pages?For example:Main pictures page (pictures.asp)Page 1 has images 1-20 (imgs1.asp)Page 2 has images 21-40 (imgs2.asp)Page 3 has images 41-60 (imgs3.asp)All these shouldn't have to be created in seperate pages apart from just the gallery.So initially imgs1.asp is included in pictures.asp, but when you click on page 2, imgs1.asp will be replaced by imgs2.asp...Please help! Thank you
Just an idea off the top of my head which I think it can be done.say you have a page calledgallary.aspIf you create at the page begining <%@ Language=JScript%> <%Server.ScriptTimeout=21478836%> <%Response.Buffer=false%><%var request = (Request.QueryString("q"));%>then create if else statementIf request ="" or request ="1" then displaylow = 0 displayhigh = 10end ifIf request = 2 then displaylow = 11 displayhigh = 20end ifif request = 3 or request > 3 then displaylow = 21 displayhigh = 30end if**** then create a loop for each image to be displayIf "image" is > displaylow AND "image" < displayhigh then command that image to displaynext*****This way your page named gallary.asp will default the first say ten imagesif you put links on your page likebutton [page1]gallary.asp?q=1.... would display 0-10button [page2]gallary.asp?q=2.... would display 11-20button [page3]gallary.asp?q=3 .... would display 21-30****that is just an idea, I am digging up an old javascript image gallary that is spiderfriendly is you dont mine doing javascript inside an asp page...I hate link to a page I might delete later but take a look at an old js I havehttp://www.stransky-webdesigns.com/site%20...g%20gallery.htmview the source code and also grab the css location for that pageI was looking for a diffrent one that did 4 across and 5 down images.Ah here it ishttp://www.stransky-webdesigns.com/jsgallery.aspJust remember to grab the css style also. I will have to clean up those sample pages of mine.even if you dont like that js, you could convert it in an all asp code.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...