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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:12:14+00:00 2026-06-16T03:12:14+00:00

I am using ASP.NET Web Forms and i created a custom .ascx user control

  • 0

I am using ASP.NET Web Forms and i created a custom .ascx user control which represents a Car having properties like Type, Picture and Color.

Now i try to add on user interface this custom control in a repetitive way. Lets say if i have in database 5 cars, then 5 user controls will be render on UI preferable inside an asp control.

I was looking for such a control, studying the grid view, and repeater but they seems to have as data source only lists of objects which are build from “primitive” types not objects like a list of my custom ascx control.

My question is if i can somehow to render those user controls inside a repetitive cycle inside an asp or html control which gives the option to format it (supports css) ? (and if so please provide me an example)

  • 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-16T03:12:18+00:00Added an answer on June 16, 2026 at 3:12 am

    Create a ListView with your user control inside of it, and then bind a List<CarObject> to that ListView

    <asp:ListView ID="listView1" runat="server">
        <ItemTemplate>
            <myUC:MyUserControl ID="myUserControl" runat="server" />
        </ItemTemplate>
    </asp:ListView>
    

    Bind a list of your object, such as List<Car>, to that list view, listView1.DataSource = myListOfCars;. Then in a ItemDataBound event bind your object to your user control.

    You could also, alternatively, place the markup from your user control inside of the ListView, and then bind the information inside of an ItemDataBound event and sidestep the whole user control issue altogether. This still allows you to reuse the markup.

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

Sidebar

Related Questions

I am using ASP.NET Web Forms/C# . I am having this function in my
I am using ASP.NET Web Forms/C# .I am having a page Customer.aspx .I have
I'm using ASP.NET Web Pages to create a form in which I can select
When developing ASP.NET websites (using VB.NET web forms) - a lot of my time
I have a ASP.NET Web Forms application and I'm using some dynamic controls in
I am working on an ASP.NET web forms application that is using Forms Authentication.
I have an ASP.NET 4 Web Forms app that is using URL Routing. I
I have an ASP.NET web application that is using forms authentication. Everything is configured
I am building a Web Application using asp.net (C#). I come from windows forms
I have a pretty big web application that I created last year using ASP.NET

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.