Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8225095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:17:57+00:00 2026-06-07T15:17:57+00:00

I have a list view with table inside and i need to get all

  • 0

I have a list view with table inside and i need to get all dropdown lists and file upload controls, but find returns nothing. This is my code:

<asp:ListView runat="server" ID="MyListView" OnItemDataBound="FillDropDownList">
    <LayoutTemplate>
        <table border="0" cellpadding="2" cellspacing="0">
        <tr>
        <th>Wholesaler</th>
        <th>Import</th>
        <th>Period</th>
        <th>Upload Date</th>
        <th>Upload</th>
        </tr>
            <asp:PlaceHolder ID="itemPlaceholder" runat="server" />
    </table>
    </LayoutTemplate>
    <ItemTemplate>
    <tr class="row1">
        <td><%# DataBinder.Eval(Container.DataItem, "Wholesaler") %></td>
            <td><%# DataBinder.Eval(Container.DataItem, "Import")%></td>
        <td><%# DataBinder.Eval(Container.DataItem, "Period")%></td>
        <td><asp:DropDownList runat="server" ID="DaysDropDownList"></asp:DropDownList></td>
       <td><asp:FileUpload ID="FileUpload" runat="server" /></td>
    </tr>
    </ItemTemplate>
</asp:ListView>

DropDownList dr = (DropDownList)MyListView.Controls[0].FindControl("DaysDropDownList");
FileUpload fl = (FileUpload)MyListView.Controls[0].FindControl("FileUpload");
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T15:17:59+00:00Added an answer on June 7, 2026 at 3:17 pm

    You need to iterate over the Items collection of the listview, and then use FindControl on each item. Something like this should put you on the right track:

    foreach (var lvItem in MyListView.Items)
    {
        if (lvItem.ItemType == ListViewItemType.DataItem)
         {
            DropDownList dr = (DropDownList)lvItem.FindControl("DaysDropDownList");
            FileUpload fl = (FileUpload)lvItem.FindControl("FileUpload");
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have to show 3 columns in List view. I tried having table inside
I have created a TableView(Grouped Table View). And I can list the items in
i have an html table inside a form in an asp.net mvc view. I
I have a table view that has a list videos. When I click on
I have list view and its adapter stored as global variables. I am not
In my application, I have list view. Selecting another item in it, triggers an
I have a list view binded to a data source. How can I enable
I have a list view with 10 columns and I want each row to
I have a list view which is bound to a DataTable source. The sorting
I have a tableview inside a popover in my main view which is a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.