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 8756987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:12:01+00:00 2026-06-13T14:12:01+00:00

I am loading a Dropdown inside a repeater but i am unable to see

  • 0

I am loading a Dropdown inside a repeater but i am unable to see the repeater.Why i am unable to see it?

aspx:

<asp:Repeater ID="Repeater1" runat="server" onitemdatabound="Repeater1_ItemDataBound">    
    <ItemTemplate> 
       <table>
           <tr>
             <td>
               <asp:DropDownList ID="DropDownList1" runat="server">                     
                  <asp:ListItem>Select</asp:ListItem> <asp:ListItem>Left</asp:ListItem> 
                  <asp:ListItem>Right</asp:ListItem> 
                  <asp:ListItem>SubString</asp:ListItem>
               </asp:DropDownList> 
              <asp:DropDownList ID="DropDownList6" runat="server"> </asp:DropDownList> 

codebehind:

 protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
{

        DataTable dt = new DataTable();
        dt = Common.LoadExample();
        DropDownList ddl = (DropDownList)e.Item.FindControl("DropDownList6") ;
        ddl.DataSource = dt;
        ddl.DataTextField = "Name";
        ddl.DataValueField = "Name";
        ddl.DataBind();

}

// datatable for loading

   public static DataTable LoadExample()
    {
        DBAccess objDBAccess = new DBAccess();
        DataTable dt = new DataTable();
        try
        {
            objDBAccess.AddParameter("@Name", SqlDbType.VarChar);
            dt = objDBAccess.ExecuteDataTable("usp_test");
            return dt;
        }
        catch 
        {

            return null;
        }

    }
  • 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-13T14:12:02+00:00Added an answer on June 13, 2026 at 2:12 pm

    I assume the reason is that you haven’t checked for the ItemType, therefore you’re getting an exception because the header doesn’t contain the DropDownList but only the items:

    protected void Repeater1_ItemDataBound(Object Sender, RepeaterItemEventArgs e) {
        // This event is raised for the header, the footer, separators, and items.
        // Execute the following logic for Items and Alternating Items.
        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) {
            // ...
        }
    }
    

    Of course there are other reasons why a repeater is not visible.

    • Repeater or one of it’s container controls is Visible="false"
    • it’s DataSource is null or empty
    • you have not databound it at all
    • …. (without code it’s difficult to help further)

    Edit Please don’t comment but edit your question with important informations.

    The breakpoint is not going inside of the repeater item data bound –
    Newbie 25 mins ago

    Then you have not DataBind it or the DataSource is null or empty. You should show us the code where you assign the datasource and call databind.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a non-databound Dropdownlist inside of an UpdatePanel: <asp:UpdatePanel runat=server ID=FiltersUpdPnl> <ContentTemplate> <div
I'm loading an ASP.NET dropdown list. Is there any advantage to doing this:: Private
I have an dropdown list box. I am loading the values from server to
I am unable to set default value for a dropdown while loading forms. Here
How can I make the jQuery autocomplete show Loading... in the dropdown while it's
I have on server control(dropdown) and One button.user can select some values in dropdown
I know there are lots of solutions for chained dropdown lists but i'm trying
I have to load the data in asp:grid after filtering from two asp:dropdown list.
I'm having a weird issue with Firefox and loading of a PDF inside an
It's been bugging me for a while now, but the ASP.NET designer in VS

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.