netsys
Posts: 39
|
Posted: 09/05/2013, 12:33 PM |
|
I've got a listbox on an editable grid that I want to show only certain items, based on a URL parameter. It's working fine with a where parameter in the listbox data source, but if I use this: <option value="">Select A Value</option> , Select A Value is always shown as the default choice in the listbox, even after narrowing the data down using the URL parameter. The correct data is present in the listbox, but the Select A Value default is always there.
This is most likely very simple. Does anyone know what's wrong here?
Thanks.
|
|
|
netsys
Posts: 39
|
Posted: 09/09/2013, 12:05 PM |
|
I did finally find the problem - if you want the listbox to get its value from the URL parameter, the name of the listbox needs to be the same as the URL parameter. In the example shown here: http://support.yessoftware.com/kb_article.asp?article_id=61, the listbox would be named state_id. It was indeed a simple solution.
|
|
|
eratech
Posts: 513
|
Posted: 10/28/2013, 10:27 PM |
|
Good work.
You can also set the values even if the listbox (or text box etc) isn't the same as the parameter, by using the 'Before Show' event of the listbox, and setting the Source to 'URL' and the name to the querystring parameter.
e
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia |
|
|
|