Good afternoon
I wonder if anyone can help me with a brain-teaser I've got. I have a database full of organisation details (names, addresses, geographical mappings etc) which I've written a fairly comprehensive Classic ASP front-end system for. The majority of drop-down lists within the search page of that system pass integer values to the back-end database which works without incident because the back-end database has been structured in that way. Similarly, the text fields pass text strings to the back-end database and that works without incident also.
My problem though is this: I have one drop-down list whose values are populated by means of a stored procedure querying a column in a table and grouping the contents of that table: unlike the other drop-down lists there is no corresponding ID value. This works for most of the contents of that column, except where the value in the column contains an ampersand (&) character. The actual population of the drop-down list works flawlessly, but the presence of the ampersand causes major issues when it comes to accepting the selected value of that list when doing a "Request.QueryString".
So, I have the following scenario:
1. When I get to the drop-down list that I've described, I set the value as Barking & Dagenham;
2. When I click the Search button, the URL that gets passed goes as http://glaweb1/doh_signposting/perfo...Submit1=Search - you can see that the space on either side of the ampersand has been replaced with a + and the ampersand itself has been replaced with %26;
3. When I run the Request.QueryString command and display it's subsequent assignment on-screen, it displays as Barking , with a trailing space at the end of it;
The page that contains the search criteria fields is using the "get" form method, but I need to know how I get around this so that the ampersand will be recognised as an ampersand by the next page. I don't have many options in terms of being able to alter the back-end data. I'm also constrained by the fact that the pages are currently live within the business. However, as you can probably imagine I have quite a serious need to get this issue resolved.
Thanks in advance
Ian Henderson
I wonder if anyone can help me with a brain-teaser I've got. I have a database full of organisation details (names, addresses, geographical mappings etc) which I've written a fairly comprehensive Classic ASP front-end system for. The majority of drop-down lists within the search page of that system pass integer values to the back-end database which works without incident because the back-end database has been structured in that way. Similarly, the text fields pass text strings to the back-end database and that works without incident also.
My problem though is this: I have one drop-down list whose values are populated by means of a stored procedure querying a column in a table and grouping the contents of that table: unlike the other drop-down lists there is no corresponding ID value. This works for most of the contents of that column, except where the value in the column contains an ampersand (&) character. The actual population of the drop-down list works flawlessly, but the presence of the ampersand causes major issues when it comes to accepting the selected value of that list when doing a "Request.QueryString".
So, I have the following scenario:
1. When I get to the drop-down list that I've described, I set the value as Barking & Dagenham;
2. When I click the Search button, the URL that gets passed goes as http://glaweb1/doh_signposting/perfo...Submit1=Search - you can see that the space on either side of the ampersand has been replaced with a + and the ampersand itself has been replaced with %26;
3. When I run the Request.QueryString command and display it's subsequent assignment on-screen, it displays as Barking , with a trailing space at the end of it;
The page that contains the search criteria fields is using the "get" form method, but I need to know how I get around this so that the ampersand will be recognised as an ampersand by the next page. I don't have many options in terms of being able to alter the back-end data. I'm also constrained by the fact that the pages are currently live within the business. However, as you can probably imagine I have quite a serious need to get this issue resolved.
Thanks in advance
Ian Henderson