Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Lisa Anderson   on Sep 14 In Asp.net Category.

  
Question Answered By: Bama Cohen   on Sep 14

I think the thing is with your dynamic repeater creation. You have to make shure you recreate it in Page Load everytime the page postbacks. 'Till this event only controls that are in aspx are put into page control tree. Everytime that server sends data to client the whole page is disposed, so you have to recreate everything again.

You must create Item template by adding other controls to it. i.e.
repeater_object.ItemTemplate.Controls.Add(some_control)...
but don't forget to give them ID's.

In ItemDataBound event you can still do the FindControl... If the server gives other actual ID's try displaying all ID's of the item to see if your item resides inside ItemTemplate...

FindControl iteself won't raise exception, but casting and using refference may if FindControl returns null. Probably this is your problem.

Share: 

 

This Question has 4 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Quick Error Or get search suggestion and latest updates.


Tagged: