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
Define tracing.
How you can access the properties and controls of master pages from content pages?
About CLR, reflection and assemblies?
What is use of <% %> in asp.net?
What are the features of asp net?
What is validation in asp.net?
How to use ipostback?
What is ashx file in asp.net?
What are the different types of cookies in asp.net?
What is postback and autopostback in asp.net?
In order to get assembly info which namespace we should import?
what are configuration files?
If I am developing an application that must accomodate multiple security levels though secure login and my asp.net web application is spanned across three web-servers (using round-robin load balancing). What would be the best approach to maintain login-in state for the users?
What is bound controls
What is mvc in asp.net tutorial? : Asp.Net MVC