1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Need help with "application" object

Discussion in 'C#' started by surfnearnzone, Feb 23, 2007.

  1. #1
    I have been trying too hard to implement a piece of code which i want appended to all pages in my website.
    SEMrush
    It is for visitor tracking. I created files and they are all working fine. I am just not able to access them from a central location so that i don't have to copy paste same file in each folder to make it work.

    Currently i call that script into any asp page using "#include" directive. For that the script page has to remain in the same folder from where the other page is calling it. But this is creating duplication as the same file has to copied in all the folders. This is eating up my web space too.

    I have searched a bit on net but i am not able to pull it off. Any help will be very much appreciated :)
     
    surfnearnzone, Feb 23, 2007 IP
    SEMrush
  2. surfnearnzone

    surfnearnzone Well-Known Member

    Messages:
    1,494
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    165
    #2
    Anyone There :confused: :(
     
    surfnearnzone, Feb 25, 2007 IP
  3. spartan789

    spartan789 Peon

    Messages:
    5
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The include shouldn't have to be called from the same directory. Not in classic ASP, or .NET. Try using "~/WHATEVER_DIR/HERE_ARE_THE_SCRIPTS/". You can also trying using a master page, if you're using .NET. I would highly recommend using it, if you can. Will make your life MUCH easier.
     
    spartan789, Feb 25, 2007 IP
    surfnearnzone likes this.
  4. surfnearnzone

    surfnearnzone Well-Known Member

    Messages:
    1,494
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    165
    #4
    Thank you so much. The code is working now. The problem was the placement of code. I was placing "# include" outside of <% %> due to which it was not working and was taking a relative path.

    I am still not sure of this and neither do i want to ;) I am just happy that a long standing problem has been solved.

    Thank you once again :)

     
    surfnearnzone, Feb 27, 2007 IP