NatH
Posts: 9
|
| Posted: 11/27/2004, 4:10 PM |
|
ASP 2.3
Hi,
I am using the Multi Registration example to create a work flow application.
I am attempting to redirect a user to another page based on a previously populated column in the data base. When the user goes to a page, the code listed below is loaded in the "Before Show" event of the page. In this case the code is loaded in "req_step_6.asp". The "1" indicates that the user does not have to input the data in the record form and they should be redirected to "reg_step_7.asp".
The code is not working and "req_step_6.asp" is displayed.
============= code ===============
If eventrequests.DataSource.RecordSet.Fields("ReqFhall") = 1 then
redirect = "reg_step_7.asp?" & "ReqID=" & Request.QueryString("ReqID")
end if
=================================
eventrequests = the record form. I did validate that "1" is actually stored in the database.
Any help you can provide would be appreciated.
NatH
|
 |
 |
mrachow
Posts: 509
|
| Posted: 11/27/2004, 11:56 PM |
|
For me it looks a little bit complicated what you have done there.
I would recommend to use CCDLookUp to retrieve this one value from the database.
_________________
Best regards,
Michael |
 |
 |
Don Safar
|
| Posted: 11/28/2004, 8:30 AM |
|
You need to move your redirect code to the after initialize event (reason -
the redirect has already been tested by the time the before show event is
executed). Not sure if you'll have access to the datasource in this event,
if not, use ccdlookup to get the info from the database.
"NatH" <NatH@forum.codecharge> wrote in message
news:641a9176e4c3dc@news.codecharge.com...
> ASP 2.3
>
> Hi,
>
> I am using the Multi Registration example to create a work flow
> application.
>
> I am attempting to redirect a user to another page based on a previously
> populated column in the data base. When the user goes to a page, the code
> listed below is loaded in the "Before Show" event of the page. In this
> case
> the code is loaded in "req_step_6.asp". The "1" indicates that the user
> does
> not have to input the data in the record form and they should be
> redirected to
> "reg_step_7.asp".
>
> The code is not working and "req_step_6.asp" is displayed.
>
> ============= code ===============
> If eventrequests.DataSource.RecordSet.Fields("ReqFhall") = 1 then
> redirect = "reg_step_7.asp?" & "ReqID=" & Request.QueryString("ReqID")
> end if
> =================================
> eventrequests = the record form. I did validate that "1" is actually
> stored
> in the database.
>
> Any help you can provide would be appreciated.
>
> NatH
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
NatH
Posts: 9
|
| Posted: 11/28/2004, 2:51 PM |
|
Thanks Don,
I moved the original code to the After Initialize event of the page and it worked.
Have a great day.
NatH
|
 |
 |
|