By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,189 Members | 1,559 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,189 IT Pros & Developers. It's quick & easy.

Creating dynamic repeaters?

P: n/a
Bare with me this is my first post.

Objective:
To dynamically create repeaters in a WebForm based on sets of data.

Problem:
When I attempt to create any Repeater from C# I get a big fat white
page with no code but that already in my .aspx page.
I have no problem creating other types of controls (ie checkboxes,
labels, etc...) but I can not figure the repeater out. I have created
and tested my templates (Header, Item, Footer) and there is no issue
there(that I know of). I am also trying to create the repeaters in a
method called from Page_Load. Can anyone please help.
public void MakeIt()
{
Repeater Test32 = new Repeater();
Test32.ID = "Test32";
Test32.HeaderTemplate = new MyTemplate(ListItemType.Header);
Test32.ItemTemplate = new MyTemplate(ListItemType.Item);
Test32.FooterTemplate = new MyTemplate(ListItemType.Footer);
sqlDataAdapter1.Fill(dataSet1);
Crap.DataBind();
PlaceHolder1.Controls.Add(Test32);
}
Nov 15 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.