UserControl with listbox

Results 1 to 2 of 2

Thread: UserControl with listbox

  1. #1
    Join Date
    Dec 1969

    Default UserControl with listbox

    Hi all,<BR><BR>I have usercontrols with 6 listboxes. I need to read the listbox vlaues and pass it to the database. How can I do that?<BR><BR>Please help me. Thank You in advance.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: UserControl with listbox

    Declare the user control which you have used in the web page in the code behind file as follows:<BR><BR>protected System.Web.UI.UserControl Sample_User_control;<BR><BR>Once a user control is declared, then you will be able to use all the list controls which are available on the user control and use them accordingly as follows.<BR><BR>Sample code:<BR><BR><BR>DropDownList drpList = new DropDownList();<BR>drpList=(DropDownList)Sample_Us er_control.FindControl("drpdwnList");<BR>Response. Write(drpList.SelectedItem.Text);

Posting Permissions

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