944,103 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 3458
  • ASP RSS
Nov 20th, 2004
0

New ASP page

Expand Post »
Every time I try to write this page I encounter many errors, usually a blank page acan anybody help me? I am just learning, really just learning. Thanks


"Write an ASP page that has a form taking a user's name as input. Store this name in a permanent cookie that expires in 4 days, and whenever the page is opened again, default the name field to the cookie's content. You can use Visual InterDev, which is available through the MSDN agreement, as an editing tool."

Patty
Reputation Points: 10
Solved Threads: 0
Newbie Poster
PLEEDS is offline Offline
1 posts
since Nov 2004
Nov 22nd, 2004
0

Re: New ASP page

Post the code you have so far been working with and we can work through and help you with it.

If you don't have any code and want somebody to write the script from scratch I accept payment through PayPal :-)
Reputation Points: 16
Solved Threads: 7
Junior Poster
Lafinboy is offline Offline
166 posts
since Jul 2004
Nov 23rd, 2004
0

Re: New ASP page

Try this code not sure it will work in your case (not sure what you want to do)

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>
<form action="?" method="post" name="name" id="name">
<input name="name" type="text" id="name" value="<%= Request.Cookies("name") %>">
<input type="submit" name="Submit" value="Submit">
<% If (cStr(Request("Submit")) <> "") Then %>
<% response.Cookies("name") = Request.Form("name")
Dim dateplus4
dateplus4 = DATEADD("d",4,Now())
Response.Cookies("firstname").Expires=dateplus4%>
<meta http-equiv="refresh" content="0;URL=?">
<% End If %>

</form>
</body>
</html>
Reputation Points: 10
Solved Threads: 0
Newbie Poster
AwSDesigns is offline Offline
8 posts
since Jul 2004
Dec 13th, 2004
0

Re: New ASP page

Problem mostprobably in <form action="?" . Instead it use action="actionpagename.asp"

Next used debug editing. This is simple like Response.write "<br>err: " & err.description
response.end

Best of Luck.

~Populate

Quote originally posted by AwSDesigns ...
Try this code not sure it will work in your case (not sure what you want to do)

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>
<form action="?" method="post" name="name" id="name">
<input name="name" type="text" id="name" value="<%= Request.Cookies("name") %>">
<input type="submit" name="Submit" value="Submit">
<% If (cStr(Request("Submit")) <> "") Then %>
<% response.Cookies("name") = Request.Form("name")
Dim dateplus4
dateplus4 = DATEADD("d",4,Now())
Response.Cookies("firstname").Expires=dateplus4%>
<meta http-equiv="refresh" content="0;URL=?">
<% End If %>

</form>
</body>
</html>
Reputation Points: 10
Solved Threads: 0
Newbie Poster
populate is offline Offline
14 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: sports score feeds
Next Thread in ASP Forum Timeline: ASP, Java and XML-RPC





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC