asp output not working

Discussion in 'C#' started by gvm, Sep 16, 2006.

  1. #1
    Hi,
    I installed lls program on my computer so I could test my asp scripts.
    I got this code from MS web site and tried running it. When I hit the submit button on the htm page all I get is the asp page source code showing and not the input name that is typed on the htm page. Any help is appreciated.

    Thanks,
    GM

    htm:
    <HTML>
    <HEAD><TITLE>ASP Application</TITLE></HEAD>
    <BODY BGCOLOR=white>
    <H1>ASP Application</H1>
    <HR>
    Type your name
    <FORM METHOD=POST ACTION=Output.asp>
    <INPUT TYPE=TEXT NAME="username">
    <INPUT TYPE=SUBMIT>
    </FORM>
    </BODY>

    asp:
    <HTML>
    <HEAD><TITLE>ASP Application</TITLE></HEAD>
    <BODY BGCOLOR=white>
    <P>You typed:

    <%
    NAME=REQUEST.FORM("username")
    RESPONSE.WRITE(NAME)
    %>
    </P>
    </BODY>
    </HTML>
     
    gvm, Sep 16, 2006 IP
  2. Froggie

    Froggie Well-Known Member

    Messages:
    665
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    120
    #2
    are you running the page from IIS or you running it from a local directory?
    seems like your running it from a local directory and that is going to be the result that it will try to download the asp file,
    you need to be running IIS and run the script/page through http://localhost/...
     
    Froggie, Sep 16, 2006 IP
  3. gvm

    gvm Guest

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for your response. I'm new to using asp and lls. I'm not sure what you mean.
     
    gvm, Sep 16, 2006 IP
  4. Carlito

    Carlito Peon

    Messages:
    679
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If your address bar says the file path instead of http://localhost/ then you are not making any requests to IIS, you're just viewing the pages with the browser.

    Try placing the files in c:\inetpub\wwwroot\. By default, this is the root of the default website in IIS. Then in your browser, navigate to: http://localhost/WhateverYouNamedThis.htm
     
    Carlito, Sep 16, 2006 IP
  5. gvm

    gvm Guest

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I tried that and received page cannot be found.
     
    gvm, Sep 16, 2006 IP
  6. gvm

    gvm Guest

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    It worked after I just typed in the browser http:\\localhost\input.htm.
    I was typing the full path earlier and that didn't work.

    Thanks for your help :)
     
    gvm, Sep 16, 2006 IP