How to make a particular page to appear by default

Discussion in 'C#' started by rag84dec, Apr 1, 2008.

  1. #1
    Hi,
    I have an ASP page whose location is "http://localhost/MatricsReloaded/adminindex.asp"...
    I would like to just type "http://localhost/" or "http://localhost/MatricsReloaded" which
    should take me to the "adminindex.asp".... how can i make this ??... is
    there any configuration file available for that ??


    THanks
     
    rag84dec, Apr 1, 2008 IP
  2. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Given it is a local host then it is just a config change in IIS to set the defaults.
     
    AstarothSolutions, Apr 2, 2008 IP
  3. Jhar

    Jhar Peon

    Messages:
    318
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    IIS is typically looking for a default.asp page and you can modify this in IIS but if you are going to host this on a shared server where you don't have IIS control you could create a page called default.asp that on pageload response redirects to your /MatricsReloaded/adminindex.asp page. VB Code to redirect would be something like:

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Response.Redirect("/MatricsReloaded/adminindex.asp")

    End Sub
     
    Jhar, Apr 3, 2008 IP
  4. InfoSmith

    InfoSmith Peon

    Messages:
    884
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #4
    set IIS for default documents
    (default is default.asp)

    so you can make your file name is default.asp, then ok
     
    InfoSmith, Apr 6, 2008 IP
  5. phase1

    phase1 Active Member

    Messages:
    158
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    58
    #5
    I second that last one - why don't you just name your page "http://localhost/MatricsReloaded/default.asp"
    where "default.asp" is your "adminindex.asp" page?
     
    phase1, Apr 9, 2008 IP
  6. dylanj

    dylanj Peon

    Messages:
    173
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #6
    Step one: Open IIS
    Step two: Open Default Website properties
    Step three: Add "adminindex.asp" to the list of default documents
    Step four: Press ok, save changes, and presto. It works
     
    dylanj, Apr 14, 2008 IP
  7. Czew

    Czew Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    IIS (I rather this...)
    or
    <%server.transfer ("URL")%>
    ;)
     
    Czew, Apr 14, 2008 IP