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

  • Home
  • SEARCH
  • 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 8905613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:26:21+00:00 2026-06-15T02:26:21+00:00

I have 2 questions: First, I put a DDL in a repeater in my

  • 0

I have 2 questions:
First, I put a DDL in a repeater in my .aspx.
Here’s my code:

<HeaderTemplate>
    <ul class ="horizontal">
  </HeaderTemplate>
  <ItemTemplate>
    <li>
<img src="<%# DataBinder.Eval(Container.DataItem, "ImagePath") %>" width="60" height="40" alt = "<%# DataBinder.Eval(Container.DataItem, "ProductName") %>"/>
        <p>ID: <asp:Literal ID="ProductIDLiteral" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ProductID") %>'></asp:Literal></p>
        <p>
            <asp:Literal ID="NameLiteral" runat="server" Text="Name: "></asp:Literal><asp:Literal ID="ProductNameLiteral" runat="server" Text = '<%# DataBinder.Eval(Container.DataItem, "ProductName") %>'></asp:Literal>
        </p>
        <p>
            <asp:Literal ID="Literal1" runat="server" Text="Price: "></asp:Literal><asp:Literal ID="UnitPriceLiteral" runat="server" Text = '<%# DataBinder.Eval(Container.DataItem, "UnitPrice") %>'></asp:Literal>
         </p>
         <p> <asp:Literal ID="QuantityLiteralLiteral" runat="server" Text="Quantity: "></asp:Literal><asp:DropDownList ID="DDLQuantity" runat="server" ><asp:ListItem></asp:ListItem>
        </asp:DropDownList></p>
        <asp:Literal ID="Literal" runat="server"></asp:Literal>
 </li>
  </ItemTemplate>
  <FooterTemplate>
      <asp:Button ID="Button1" runat="server" Text="Validate!" />
    </ul>
  </FooterTemplate>
</asp:Repeater>

well, the first question, is How can I populate my DDL from the code behind?
Then How can I do, to populate the DDL with <1-2-3-4>
If the source value is 4.
Thank you!!

  • 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-15T02:26:23+00:00Added an answer on June 15, 2026 at 2:26 am

    You can use the Init event to populate a DropDownList:

    protected void DropDownList1_Init(object sender, EventArgs e)
    {
        for (int i = 1; i <= 4; i++)
        {
            ((DropDownList)sender).Items.Add(i.ToString());
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some questions with relationship of ef code first. My code: public class
So this was one of my very first questions here, but I have a
I have two questions. My first one is, that how can i put something
It is my first post here. I would have two questions with regard to
I have two questions. First, I want to put markers in my Google map
I have few questions. First of all does code below violates law of Demeter?
I have two questions. (First) I'm trying to make it where whenever the iPhone
I have two questions, actaully... First off, Why cant I do this: List<Object> object
I am writing my first FireFox extension and I have some questions. Maybe someone
Hey everyone, I want to start using Scheme and I have two questions. First,

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.