Finding control In Ajax Tab container

27 09 2008

Suppose you have a repeater control inside ajax tab container and you want to bind data with that repeater. If on your page you try to directly bind data with it, it will generate error and say that “repeater is not found”.

You have to first find the repeater and then you can do all the things with it as you do in normal .

Control myControl = TabContainer1.Tabs[0].FindControl(”RepeaterName”);

Repeater MyRepeater = (Repeater)myControl;

or simply in single step

Repeater MyRepeater =(Repeater)TabContainer1.Tabs[0].FindControl(”RepeaterName“);

Now you can bind data with it or do any operation with this repeater.

Hopefully it will help, if find helpful please leave a comment


Actions

Information

Leave a comment