Can you edit data in the Repeater control?
Answer Posted / sivaprasad
Yes We Can Edit Data In a RepeaterControl,it is based on our
designing
Example:Display Data What Ever YOU want in Labels and same
data in to Textboxes(visible = false) while page is loading
and when user clicks Edit Button put all labels to visible
false and and all text boxes to visible true,
foreach(control con in Repeater.Items)
{
foreach(Control ctl in con.Controls)
{
if(ctl is TextBox)
{
((Textbox)ctl).Visible = true;
}
if(ctl is Label)
{
((Label)ctl).visible = false;
}
}
}
After This Iterate Through All Items in Our Repeater Like
for(int i=0;i<Repeater.Items.Count;i++)
{
string txt =
((Textbox)Repeater.Items[i].FindControl("Textboxid")).Text;
}
Get The Edited Text Like This And Update into Database
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
How can we apply themes to an asp.net application?
What is inproc mode in session?
What do you understand by aggregate dependency?
How does the iis work?
Is asp.net still used?
Differences between “dataset” and “datareader”.
Explain the use of errorprovider control in .net?
What are the different method of navigation in asp.net?
What is the difference between application state and caching?
Why we use content place holder in asp.net?
What is Web Server Control Templates.?
What are the advantages of asp.net mvc framework? : asp.net mvc
What is event in asp.net?
Explain the difference between server.transfer and response.redirect? Why would I choose one over the other?
How to change Master page in ASP.Net using code?