Buy Shares | Remortgages | Credit Counseling | Mobile Phones | Loans
Trouble with ASP, IIS [Archive] - PCMech Forums

PDA

View Full Version : Trouble with ASP, IIS


JahShuWah
04-02-2003, 09:33 AM
Hi, I just set up IIS on Microsoft 2000 Server. I am able to successfully create html pages, but I'm having some trouble with asp pages.

I can get the asp pages to show up in the browser just fine, however, it seems that i am unable to pass variables through a form. I know that the VBScript's are working, but again, I just can't seem to pass a variable.

Here's the code for the page "HelloWorld.asp":

<%@ Language = VBScript %>
<% Option Explicit %>
<%
dim x
x = Request.Form("Name")
%>
<HTML>
<BODY>
The last person to visit was: <%=x%>


<FORM METHOD=POST ACTION="HelloWorld.asp">
Hello, what is your name?
<INPUT TYPE=TEXT NAME=Name>
<INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>


The page loads just fine in the browser, but it seems that the
variable is not passed through the form. The resulting page in the
browser looks like this:

/////////////////////////////////////////////////////////////
The last person to visit was:

Hello, what is your name? TEXT BOX HERE SUBMIT BUTTON HERE
/////////////////////////////////////////////////////////////

Notice how there is no name listed on the first line. If I cut out
the Request part of the code, and set x equal to a hardcoded name it
works just fine and the name shows up.

Sitting here scratching my head. Not sure what the hang up is. Do I
need to enable some kind of ASP component or something? I don't
know.