Reading selectbox item values and moving to new asp.net page

liunx

Guest
Hi, I am having problems reading select item values from my cs codebehind.
On my aspx page I use javascript to move items between selectboxes.
Now my question is - what should I do in order for my "search" button to send the items in the selectboxes, first to a function where validity is checked and then to dynamic query.

I am also in need of information how I can make queries dynamic (select depending on items in "select"-selecter and where dependant on items in "where"-selecter) not only for another aspx but also for Crystal Reports .NET for Visual Studio 2003.

Thanks in advanceunless you select all of the values in the listbox, the code nebind is not going to know what was selected. Developers normally use a hidden textbox to place the values of the selected items in. When an item is added, its value is added to the hidden box. Then when the form is posted back, you would have to do a split of the form field's text and you have all of the values.

EricSounds like a good idea.
I have tried and made a javascript function that fills the hidden text field.
However I still cannot get the value of that hidden text field read by my codebehind.
I have no idea what I could be doing wrong.Are you adding runat=server to the hidden field and adding the reference to the HTML control in the code behind?

EricYou are right - I did not have runat="server" on the hidden text fields.
Now it works perfectly.
Thankyou very much :)
 
Back
Top