Forums
This topic is locked
Pass specific urlparameter after insert
Posted 27 Jun 2002 12:56:51
1
has voted
27 Jun 2002 12:56:51 Santo Peroni posted:
After inserting a record with a specifik category the user must be redirected to a detailPage that shows all records under the same category the user just inserted.The detail page works fine. Im having trouble with the insertPage.
How do I pass the category he inserted to the detailpage?
Replies
Replied 27 Jun 2002 13:15:08
27 Jun 2002 13:15:08 Owen Eastwick replied:
Are you using the Insert Record server behaviour or on created by using Command (Stored Procedure)?
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 27 Jun 2002 14:11:20
27 Jun 2002 14:11:20 Santo Peroni replied:
Im using Insert record behaviour.
Replied 27 Jun 2002 17:37:44
27 Jun 2002 17:37:44 aegis kleais replied:
Just set a session variable along with it to pass the variable seperately so that you can make an individual recordset dependant on it.
I'm assuming the category is a dropdown box. Dropdown boxes have 2 values of much importance:
<option value="sup">Wha</option>
THough the user sees only Wha, the actual value being passed in the forum is "sup". So here's the beef. When you do an insert, your form is using the POST method, which means that data is not appended to the end of the URL. So you can't use Request.QueryString to obtain the category info.
Suppose the name of the select box was "selectCategory". Use the following code on the page after INSERT to get the value of the dropdown box:
<%=Request.Form("selectCategory"%>
This should insert the value of the category selected. Of course, you'd be using it to create a new recordset for the detail page
I'm assuming the category is a dropdown box. Dropdown boxes have 2 values of much importance:
<option value="sup">Wha</option>
THough the user sees only Wha, the actual value being passed in the forum is "sup". So here's the beef. When you do an insert, your form is using the POST method, which means that data is not appended to the end of the URL. So you can't use Request.QueryString to obtain the category info.
Suppose the name of the select box was "selectCategory". Use the following code on the page after INSERT to get the value of the dropdown box:
<%=Request.Form("selectCategory"%>
This should insert the value of the category selected. Of course, you'd be using it to create a new recordset for the detail page
Replied 27 Jun 2002 18:42:00
27 Jun 2002 18:42:00 Santo Peroni replied:
I tryed to add the requestform code:
<%=Request.Form("selectCategory"%> After the insert code.
But I get the:
ADODB.Field (0x800A0BCD)
either BOF or EOF true, or the actual post deleted.
umm... HELP!
<%=Request.Form("selectCategory"%> After the insert code.
But I get the:
ADODB.Field (0x800A0BCD)
either BOF or EOF true, or the actual post deleted.
umm... HELP!
Replied 27 Jun 2002 19:04:20
27 Jun 2002 19:04:20 aegis kleais replied:
The EOF or BOF usually means that the table field you call at the designated offset does not contain a record. If you can for error testing, just connect to a table that has 1 field and 1 record (that is full of info)
The code I gave you should be placed on the Detail page. There is no information in Request.Form on the insert page. On the INSERT behavior, I assume you have it going to the DETAIL page after INSERTION is complete, right? Add the code I showed you on the DETAIL page before the <html> begins. If you want to set it to a variable try
<%...............
selectCat = Request.Form("selectCategory"
%>
<html>
....................
The category you selected was : <%= selectCat %>.
The code I gave you should be placed on the Detail page. There is no information in Request.Form on the insert page. On the INSERT behavior, I assume you have it going to the DETAIL page after INSERTION is complete, right? Add the code I showed you on the DETAIL page before the <html> begins. If you want to set it to a variable try
<%...............
selectCat = Request.Form("selectCategory"
%>
<html>
....................
The category you selected was : <%= selectCat %>.