Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Pass and ID Variable from a Retrieve Table to a new page
Old 11-12-2004, 10:14 AM Pass and ID Variable from a Retrieve Table to a new page
barbara's Avatar
Skilled Talker

Posts: 79
Trades: 0
Can I pass an ID from a retrieve table display to a new page?

This is what i try to accomplish:

I retrieve all the new submission from the Customber database based on the date enter by a user.

I have a field call: TestRequest (which is a check box from the customer database)

I have about 10 different tests on the input form. i then create a hyperlink to the individual test page. I try to pass the customer_ID from the table customer to the Test1 form, but the values of Test1 didn't get pass. It is on my local IIS.

Can someone help?
barbara is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-14-2004, 07:51 AM
vivekar's Avatar
Webmaster Talker

Posts: 612
Trades: 0
You should try passing the customer ID also in the querystring.

append the querystring like
testrequest.asp?testid=15&custid=254

Or if you use a login script, then a cookie can be retrieved in the testrequest.asp to get the customerid.
__________________

Please login or register to view this content. Registration is FREE
(Active since 2003) |
Please login or register to view this content. Registration is FREE
vivekar is offline
Reply With Quote
View Public Profile Visit vivekar's homepage!
 
Old 11-16-2004, 02:58 PM
barbara's Avatar
Skilled Talker

Posts: 79
Trades: 0
I append the querystring in the hyperlink. can i capture it and add the customer_id to the Test1 database?

thanks
barbara is offline
Reply With Quote
View Public Profile
 
Old 11-16-2004, 10:41 PM
vivekar's Avatar
Webmaster Talker

Posts: 612
Trades: 0
I do not understand your question. Can you please explain it further?
What steps you want to get done?
What you have done as of now?
Do you have a login page?

You can get the details from the querystring using
Code:
 myvar = Trim(Request.Querystring("var"))
__________________

Please login or register to view this content. Registration is FREE
(Active since 2003) |
Please login or register to view this content. Registration is FREE
vivekar is offline
Reply With Quote
View Public Profile Visit vivekar's homepage!
 
Old 11-17-2004, 10:28 AM
barbara's Avatar
Skilled Talker

Posts: 79
Trades: 0
I am new to ASP programming. This operation that i am trying to do is working correctly in MS Access. Now, my boss wants me to web-enable; so that more people can access it. In MS Access, i have customer info as the main form(along with add, edit, delete button); and the TestRequest as the subform.

I do not have a login page; just a simple page asking for what date the user( or data entry operator) would like to retrieve the latest Test Request from tblcustomers (The Test Request form is a form that reside on the internet allowing customers to enter their own information and request which test they want us to perform.)

Based on that date, for example, 11/15/04, it will retrieve all data that is enter after that date. Then on the display list of customers -- the table contains customer info and which test(s) he/she have requested (The customers may request multiple tests to be perform.)

example of my results:

cust_id cust_name submitdate testrequest
1 Joe Smith 11/15/04 Test1
2 John Brown 11/16/04 Test1, Test2

Based on what test the customer requested, i want to make the Test Request (such as Test1) a hyperlink and also pass the customer's id to the TestRequest database table (since different customer can request the same test to be perform). i have the Cust_ID as a foreign key in the TestRequest table. The cust_id is an auto number. Am I doing this problem the wrong way?

thanks
barbara is offline
Reply With Quote
View Public Profile
 
Old 11-17-2004, 04:57 PM
barbara's Avatar
Skilled Talker

Posts: 79
Trades: 0
Disregard the previous posting. I try what you suggest (using querystring). I got the customer id value to pass from the query result to display on the Test1 page. Test1 page contains the variable that stores the results of the tests which is on a form. the user enter the results then hit the "submit" button to a page that writes to the database (which now the customer id value is null). I store the customer id value in the Test1 pages in a hidden text input hoping that it will store the value that was pass from the previous page.

on top of Test1 page:

<%
dim ID
ID=Request.querystring("custid")
response.write("<p>customer id is " & ID & " !</p>")
.....
values is ok

at bottom of page before the end of the form:

<input type="hidden" value="ID" name="txtCustID">
.....

on the page that writes to the database (at the top):

Dim ID
ID=Request.form("txtCustID")
response.write("<p>customer id is " & ID & " !</p>")
.......

results (just doing a response.write to check the value):

customer id is ID !


Got any idea how the value has lost along the way?

thanks

Last edited by barbara; 11-17-2004 at 05:03 PM..
barbara is offline
Reply With Quote
View Public Profile
 
Old 11-17-2004, 09:32 PM
vivekar's Avatar
Webmaster Talker

Posts: 612
Trades: 0
Code:
<input type="hidden" value="ID" name="txtCustID">
you should have used it like

<input type="hidden" value="<%=ID%>" name="txtCustID">
__________________

Please login or register to view this content. Registration is FREE
(Active since 2003) |
Please login or register to view this content. Registration is FREE
vivekar is offline
Reply With Quote
View Public Profile Visit vivekar's homepage!
 
Old 11-18-2004, 12:53 PM
barbara's Avatar
Skilled Talker

Posts: 79
Trades: 0
thanks. it work!
barbara is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Pass and ID Variable from a Retrieve Table to a new page
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26416 seconds with 12 queries