#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    1
    Rep Power
    0

    [C#] Unbound Data Repeater - is it possible?


    Hey!

    I'm kicking around in Visual Studio just experimenting more than anything, really - and I'm now trying to simply add elements to a Data Repeater by hard coding instead of just data binding. Is this at all possible? I didn't think this would actually be hard but I'm stumped.

    Also - hi, I'm new!
  2. #2
  3. ASP.Net MVP
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Aug 2003
    Location
    WI
    Posts
    4,378
    Rep Power
    1510
    The repeater must have a data source. If you want to add items at run time, add them to the source. You can also try using a projection (.Select()) off of the Enumerable.Range() method as the data source.
    Primary Forum: .Net Development
    Holy cow, I'm now an ASP.Net MVP!

    [Moving to ASP.Net] | [.Net Dos and Don't for VB6 Programmers]

    http://twitter.com/jcoehoorn

IMN logo majestic logo threadwatch logo seochat tools logo