Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 7th, 2003, 06:20 PM
Authorized User
 
Join Date: Jun 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default Redirecting

I am REAL new to ASP, and I'm trying to figure out how to do something. I am not a programmer, so I need very explicit help.

I have a web page, generated by the following link in an HTML page:

<A HREF="http://server/trData?sql=EXECUTE+up_select_xml_projects+'0'+&xsl =Projects.xsl&ContentType=Text/HTML&Root=Project" Class="BlueText">Projects</A>

The result is an XML page. The XML page includes an Archive button, which activates the following:

<xsl:when test="@Archive_ID='0'">
<FORM METHOD="POST" ACTION="/testresults/archive.asp"
<INPUT TYPE="HIDDEN" NAME="ProjID" VALUE="{@Project_ID}"/>
<INPUT TYPE="image" SRC="/testresults/archive.gif" VALUE="Move to Archive"/>

The archive.asp file correctly sends a command to the SQL server, but I'm left at a blank page in the browser. If I hit the Back button, I return to the original list, but it still shows the "Archived" project, and I have to refresh the browser.

I think I need to put something in the ASP file that will automatically reload the page generated by the original anchor above.

Can anyone help?

Thanks,
Ken
 
Old July 7th, 2003, 07:45 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Ken,

To redirect from one page to another in ASP use:

Response.Redirect("thePageName.asp")

If you put after your page has done its processing and point it back to were you came from it should hold any new data.
Is that what you were asking?

Rod
 
Old July 8th, 2003, 04:15 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to NotNowJohn
Default

Ken,

If you want to refresh your main page it is recommended to post form action to the page itself, not to the archive.asp page. You can move the archive logic from archive.asp page to the top of your main page. In that way, the archive action will be performed before the main page displaying, and the data in the list will be recent.

HTH.
NNJ

...but the Soon is eclipsed by the Moon





Similar Threads
Thread Thread Starter Forum Replies Last Post
redirecting users t0r3ad0r ASP.NET 1.0 and 1.1 Professional 1 October 5th, 2006 10:32 PM
URL Redirecting ashbmpg Apache Tomcat 0 September 15th, 2006 03:57 AM
Page Redirecting venkatagiri ASP.NET 2.0 Basics 0 June 22nd, 2006 06:17 AM
Redirecting eldanh ASP.NET 1.0 and 1.1 Basics 3 August 9th, 2004 09:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.