Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
80367 Points
6801 Posts
May 16, 2008 05:21 AM|LINK
Hi,
You can use FindControl to get the control in Repeater.
foreach (RepeaterItem Item in Repeater1.Items) { TextBox TextBoxEntry = (TextBox)Item.FindControl("TextBox1"); string valueNew = TextBoxEntry.Text; Response.Write(valueNew); }
You can also use Repeater1.ItemDataBound event to set control in each item.
Hope it helps.
Vince Xu - M...
All-Star
80367 Points
6801 Posts
Re: literal inside repeater is not declared
May 16, 2008 05:21 AM|LINK
Hi,
You can use FindControl to get the control in Repeater.
foreach (RepeaterItem Item in Repeater1.Items)
{
TextBox TextBoxEntry = (TextBox)Item.FindControl("TextBox1");
string valueNew = TextBoxEntry.Text;
Response.Write(valueNew);
}
You can also use Repeater1.ItemDataBound event to set control in each item.
Hope it helps.