Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dropdownlist control
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01003952
Message ID:
01005093
Views:
20
I found it... I was having one of those days! The program was doing exactly what I was telling it to do! SET DOWHATIMEANT was off.


>Hi Wayne,
>
>Where are you setting item.value like that? If you're firing that on every hit you're basically resetting the value. You need to make sure you ste that value only;
>
>if (!IsPostback)
>
> item.value = "-99999"
>
>Otherwise you resetting the value and blowing away the user choice.
>
>+++ Rick ---
>
>>I thought this was simple... I must just be missing something;
>>
>>Here's the load code for the control;
>>
>>        ods = odata.proc_figetlookupfromtable("tbllistcustomerjobs", "ipkey", "cjobname", "icustomer", lcCustomer)
>>        cboCustomerJobs.DataSource = ods
>>        cboCustomerJobs.DataMember = "_lookup"
>>        cboCustomerJobs.DataTextField = "cdescription"
>>        cboCustomerJobs.DataValueField = "ipkey"
>>        Me.cboCustomerJobs.DataBind()
>>
>>        Dim item As New ListItem
>>        item.Text = "All"
>>        item.Value = "-99999"
>>        cboCustomerJobs.Items.Add(item)
>>        '       ' Make wildcard list item selected
>>        cboCustomerJobs.SelectedIndex = cboCustomerJobs.Items.Count - 1
>>
>>
>>The getlookupfromtable function is a generic function that returns a lookup pair from any table in the db - I send the table I want, the key field name, the description field name, the limiting field name, and the limit value for the limiting field. All this calls a sp and returns a dataset. In the resulting html, it looks correct.
>>
>>
>>						<select name="cboCustomerJobs" id="cboCustomerJobs">
>>	<option value="18281">1 & 2 TON TRUCKS         </option>
>>	<option value="17160">1 TON & 2 TON TRUCKS     </option>
>>	<option value="17161">BIG FORKLIFT STINGER     </option>
>>	<option value="17162">BP AMOCO RENTAL          </option>
>>	<option value="17164">Equ Slings               </option>
>>	<option value="17163">EQUIPMENT SLINGS         </option>
>>	<option value="17165">FOR EQUIPMENT SLINGS     </option>
>>	<option value="17166">FOR SHOP USE             </option>
>>	<option value="17977">H241 TUGGER SLING        </option>
>>	<option value="18354">H315 TUGGER              </option>
>>	<option value="19355">HACKSAW STAND            </option>
>>	<option value="18286">HURRICANE SUPPLIS        </option>
>>	<option value="18287">HURRICANE SUPPLY         </option>
>>	<option value="17167">Load Test                </option>
>>	<option value="17168">N/A                      </option>
>>	<option value="17169">NA                       </option>
>>	<option value="17170">ONE TON TRUCK            </option>
>>	<option value="17171">PAINT BOOTH              </option>
>>	<option value="17172">PERSTOCK SLINGS          </option>
>>	<option value="17173">RENTAL FLEET             </option>
>>	<option value="17174">REPAIRS/RECERTS          </option>
>>	<option value="20754">REPLACEMENT SLING        </option>
>>	<option value="17175">SHOP USE                 </option>
>>	<option value="17176">SLING RECERT             </option>
>>	<option value="17177">SLING REPAIRS / RECERTS  </option>
>>	<option value="17178">STRAP REPLACEMENT        </option>
>>	<option selected="selected" value="-99999">All</option>
>>
>></select>
>>
>>
>>
>>No Matter what I pick, I get "-99999" as the value;
>>
>>
>>
>>    Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGo.Click
>>        Dim cjob As String
>>        cjob = cboCustomerJobs.SelectedItem.Value
>>        Response.Redirect("fi_outitems.aspx?cjob=" + cjob.Trim)
>>    End Sub
>>
>>
>>I know am just missing something simple... but I don't see it.
>>
>>TIA
>>
>>
>>>>Is there any sort of limit to the number of items that the drodownlist control can handle? I am having a problem with one that has quite a few - it will only return the first one in the list no matter what I do.
>>>
>>>You might want to check if there are invalid characters in the data somehow? I'm pretty sure ASP.NET will fix that up, but check the HTML for the list that gets generated. Especially watch for & and angle brackets in the text of the items.
>>>
>>>+++ Rick ---
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown
Previous
Reply
Map
View

Click here to load this message in the networking platform