The system is telling you that it cannot find a passed-in variable named "field1" and, thus, has nothing to put into "s".
Are you getting to this page via the calling/sending page?
A way to debug this page is to comment out the line that is setting the "s" variable from the Request.QueryString. Then add a line that sets "s" to a value that you know is in the database's "genre" column: "var s = "<whatever that genre is>";
(You could also just type the url for this page along with "?field1=<whatever the genre is>" into the browser's address field and run it (as though the sending page had correctly done its job))
Then run the page and validate that, at least the query is working.
Once you have done that, remove the newly added "var s = ..." line and uncomment the line that sets it from the query string. Check out the code in your calling page. Try running the calling page and see if the variable gets into the receiving page.
If you have an error still, provide the calling page code.
rrrsr7205
Participant
1308 Points
316 Posts
Re: Passing a textbox value through a hyperlink
Apr 08, 2012 02:47 PM|LINK
OK.
The system is telling you that it cannot find a passed-in variable named "field1" and, thus, has nothing to put into "s".
Are you getting to this page via the calling/sending page?
A way to debug this page is to comment out the line that is setting the "s" variable from the Request.QueryString. Then add a line that sets "s" to a value that you know is in the database's "genre" column: "var s = "<whatever that genre is>";
(You could also just type the url for this page along with "?field1=<whatever the genre is>" into the browser's address field and run it (as though the sending page had correctly done its job))
Then run the page and validate that, at least the query is working.
Once you have done that, remove the newly added "var s = ..." line and uncomment the line that sets it from the query string. Check out the code in your calling page. Try running the calling page and see if the variable gets into the receiving page.
If you have an error still, provide the calling page code.