listbox data

Results 1 to 2 of 2

Thread: listbox data

  1. #1
    Join Date
    Dec 1969

    Default listbox data

    Hi,<BR>I have a ListBox which I populate on the client side using javascript to avoid frequent postbacks.<BR>The listbox is rendered as a &#060;select...&#062; on the browser and to populate it I have to work with &#060;options...&#062;<BR><BR>However when I&#039;m finally ready to post, since I did not use &#060;asp:ListItems...&#062; but used &#060;options...&#062;, the .item.count of the listbox is zero and I don&#039;t see a way to grab the data.<BR>Any thoughts?<BR><BR>Can you think of another approach maybe with Request("") object?<BR><BR>Thanks.<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: listbox data

    Hi,<BR>Could you elaborate you problem in more detail i.e. could you please tell where exactly are you accessing the item.count property.<BR><BR>So if you are accessing on client side then you should use listbox.options.length.<BR><BR>and if you are accessing on server side make sure the listbox has runat=server tag and user listbox.Items.Count property..<BR><BR>Hope that helps.<BR><BR>Regards,<BR>Angrez

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts