find control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two repeaters in a page... how do i access textbox values of one
repeater from another? for example if i have repeater 1: rptIssue repeater2:
rptReturn

I want to bind the textbox values from repeater1 in repeater2.

Here is what i am donig.. but i can't access the repeater1 controls in
repeater2: ..

public void rptReturn_ItemDataBound(object s, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem)
{
TextBox txtReceiveBy =
(TextBox)e.Item.FindControl("txtReceivedBy");
//this textbox is in repeater1 but can't access it
}
}

Many thanks in advance.
 
Huzz:

e.Item.FindControl will be looking in the rptReturn Repeater - you'll
want to use FindControl on a item in rptIssue. How do you know which
record? Does row 1 always match to row 1 in the other repeater?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top