VB Newbie, Retrieve Listbox value from Control

  • Thread starter Thread starter David J Duryea
  • Start date Start date
D

David J Duryea

Please if anyone can help, it would be greatly appreciated


I have a VB form on a page called create.aspx with some text fields and
listboxes.
I also have a control on the form

<%@ Register TagPrefix="UserControl" TagName="Categories"
Src="/Categories.ascx" %>

The Control Categories.ascx contains 2 listboxes CatID and SubCatID

The create.aspx page posts its values to a stored Proc. However I cannon
obtain the vaules from the listboxes on Categories.ascx.

I have tried
Request.Form("CatID")
CatID.SelectedItems.Value

If anyone can help I would appreciate it.

Thanks in advance.

Dave
 
Hi,

Use FindControl to find the user control and then the list box :
FindControl("WebUserControl11").FindControl("DropDownList1")


Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top