What do we do with asp page?

L

Learner

If we should write some pages in asp using fp2003,I want to know which one
is resided in web server? and whch one will be shown at client browser?
for example:
if we write text between body:
<form action="demo.asp" method="post">
Your name: <input type="text" name="fname" size="20" />
<input type="submit" value="Submit" />
</form>

we get a block after text: your name. so you can imput your name in it.

but if we put the following text in browser, we still get this text without
showing hello or how are ou today?

dim fname
fname=Request.Form("fname")
If fname<>"" Then
Response.Write("Hello " & fname & "!<br />")
Response.Write("How are you today?")
End If

if it reside in server side, we shall get what it shown.

in the same way
if we reside following at server we get right time. but if we show at
browser we get all text.
var d=new Date()
var h=d.getHours()
Response.Write("<p>")
Response.Write(d + " (China Time)")
Response.Write("</p>")
if (h<12)
{
Response.Write("Good Morning!")
}
else
{
Response.Write("Good day!")
}
 
S

Stefan B Rusynko

The code must be in a visible part of the asp page (in you case named demo.asp) inside the BODY tags
<%
dim fname
fname=Request.Form("fname")
If fname<>"" Then
Response.Write("Hello " & fname & "!<br />")
Response.Write("How are you today?")
Else
Response.Write("You did not enter a name")
End If
%>

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| If we should write some pages in asp using fp2003,I want to know which one
| is resided in web server? and whch one will be shown at client browser?
| for example:
| if we write text between body:
| <form action="demo.asp" method="post">
| Your name: <input type="text" name="fname" size="20" />
| <input type="submit" value="Submit" />
| </form>
|
| we get a block after text: your name. so you can imput your name in it.
|
| but if we put the following text in browser, we still get this text without
| showing hello or how are ou today?
|
| dim fname
| fname=Request.Form("fname")
| If fname<>"" Then
| Response.Write("Hello " & fname & "!<br />")
| Response.Write("How are you today?")
| End If
|
| if it reside in server side, we shall get what it shown.
|
| in the same way
| if we reside following at server we get right time. but if we show at
| browser we get all text.
| var d=new Date()
| var h=d.getHours()
| Response.Write("<p>")
| Response.Write(d + " (China Time)")
| Response.Write("</p>")
| if (h<12)
| {
| Response.Write("Good Morning!")
| }
| else
| {
| Response.Write("Good day!")
| }
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top