SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Zealot
    Join Date
    Jan 2006
    Posts
    125
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ASP or .NET - how to tell what the server is running?

    I also posted this in the Classic ASP forum.

    I am a total newb when it comes to either, so can I run a test page to see if the server is running one or either?

    Also, in PHP I usually use an include statement to include files that contain common elements like menus or footers. Is there a similar statement in ASP?

  2. #2
    SitePoint Zealot
    Join Date
    May 2008
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To test asp, create a page called test.asp and see if it works (doesn't error).

    To test .net, create a page called test.aspx and see if it works (doesn't error).

    An asp include should work like this:

    Code:
    <%
      <!--#include file="test2.asp"-->
    %>
    renkai.com

  3. #3
    SitePoint Evangelist praetor's Avatar
    Join Date
    Aug 2005
    Posts
    479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your host should have this information available, you don't have to guess it. Bte, forget about ASP, is dead, go only with asp.net

  4. #4
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,880
    Mentioned
    48 Post(s)
    Tagged
    0 Thread(s)
    That way of doing includes is very old. A lot better way of doing it is to create a UserControl and insert that on you page. It is a .ascx file. Then you also have something called a Master Page. Which usually contains your sites header, menus and footer. With a content section or more depending on your needs. Then each aspx page points to the master and you put your code into those content blocks declared on the master page.

  5. #5
    SitePoint Zealot
    Join Date
    May 2008
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by NightStalker-DNS View Post
    That way of doing includes is very old. A lot better way of doing it is to create a UserControl and insert that on you page. It is a .ascx file. Then you also have something called a Master Page. Which usually contains your sites header, menus and footer. With a content section or more depending on your needs. Then each aspx page points to the master and you put your code into those content blocks declared on the master page.
    Just to clarify, you're describing how .net works. The question regarding includes was about asp.
    renkai.com

  6. #6
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    If creating a new site or whatever do not bother with classic ASP forget it even exists. IT IS A DEAD LANGUAGE.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  7. #7
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,653
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    If the site has an asp extension, it is probably ASP. If it has a /bin folder with some .dll files, it is probably .NET. Server generally is capable of running both.

    I second what logic_earth said.

  8. #8
    SitePoint Zealot
    Join Date
    Jan 2006
    Posts
    125
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for all the replies. I did the test Renkai suggested and got errors, so that answers my question

  9. #9
    SitePoint Wizard webcosmo's Avatar
    Join Date
    Oct 2007
    Location
    Boston, MA
    Posts
    1,480
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    One of the easiest way of checking it is knowing what .net version installed.
    Create a page with this javascript
    javascript:alert(navigator.userAgent)

    open that on IE. It should tell you the .net version installed if any.

    Alternatively you can simply create a test script with .net code on it see if that runs.

  10. #10
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,653
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    That is all fine and good -- if you want to know what version of .NET the computer with that instance of IE is running. It won't tell you in any way what the server is running.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •