Dynamic Includes from URL

Discussion in 'C#' started by altacontact, Dec 19, 2007.

  1. #1
    Hi guys, I'm a newbie so excuse my question if it seems trivial:

    Here goes-

    Is there any way to dynamically generate an include file based on a variable passed to the asp page via a url ?- so for example:

    Person x clicks on a url - that ur directs them to template.asp (template.asp has no code in it other than page title etc and <!--#include file="<%variable%>" --> )

    Once in template.asp the page loads the include file that is relevant to the companies website that the link was clicked from.

    In that include file will be the correct form and stylesheet setting for that company.

    What we are trying to do is achieve a global template file which multiple customers can direct peo[ple through and all the data is therefore stored in one central repository.

    The file displayed when they reach template.asp will depend on the url they clicked. Basically how can i get the url to pass the variable which the include file will then load??

    Thanks

    Roberto
     
    altacontact, Dec 19, 2007 IP
  2. urstop

    urstop Peon

    Messages:
    224
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you can write a IF else clause or a select statement based on the variable value. And then based on this conditions include the respective file.
     
    urstop, Dec 21, 2007 IP