Forum Moderators: phranque

Message Too Old, No Replies

.asp problems

trying to learn and am stuck

         

Blelisa

5:59 pm on Feb 10, 2005 (gmt 0)

10+ Year Member



Hi all,
I am in the process of teaching myself the basics of .asp. I am trying to write and .asp page that sits on my server that does server side scripting that will process a form and give the info back in html format. Here is the jist of my .asp (mod's I think this is okay since it is just a sample page and not trying to sell my wares) When I try to process this I get a 500 internal server error. I know my server can handle .asp because the previous person has an .asp page already up and functioning, any help is greatly appreciated:

<html>
<head>
<title>first asp</title>
</head>
<body>
<p>Your first name is<% = Response.wkfour("fname") %></p>
<p>Your last name is <% = Response.wkfour("lname") %></p>
<p>Your email is <% = Response.wkfour("email") %></p>
</body>
</html>

too much information

6:20 pm on Feb 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think the problem is with your use of 'Response'. you need to use 'Response.write' instead:

<html>
<head>
<title>first asp</title>
</head>
<body>
<p>Your first name is<% = Response.write wkfour("fname") %></p>
<p>Your last name is <% = Response.write wkfour("lname") %></p>
<p>Your email is <% = Response.write wkfour("email") %></p>
</body>
</html>

*correction*
Then again... In this case you can just drop the 'Response' all together:

<html>
<head>
<title>first asp</title>
</head>
<body>
<p>Your first name is<%= wkfour("fname") %></p>
<p>Your last name is <%= wkfour("lname") %></p>
<p>Your email is <%= wkfour("email") %></p>
</body>
</html>

Zipper

6:27 pm on Feb 10, 2005 (gmt 0)

10+ Year Member



try using <%=Request.Form("fname")%> etc..

Blelisa

6:41 pm on Feb 10, 2005 (gmt 0)

10+ Year Member



Zipper, Thanks soooo much, that was it! I was using the name of my form not form in the vbscript code.
Thanks for the help!