Conditional includes in ASP

后端 未结 3 609
轮回少年
轮回少年 2021-01-24 00:16

We have a number of categories with products in an ASP eCommerce site and, based on the category, would like a particular file to be included. For example, if URL is:

         


        
3条回答
  •  旧时难觅i
    2021-01-24 00:32

    I use a script taken from https://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=9796&lngWId=4 (dynamic ASP inclusion)

    So after including that script in your code, you just have to write:

    myMenu = Request.Querystring("idCategory")
    Include("menu"&myMenu&".asp")
    

提交回复
热议问题