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
What are the ways to show data grid inside a data grid for a master details type of tables? If we write any code for DataGrid methods, what is the access specifier used for that methods in the code behind file and why?
Define authentication and authorization.
Which adapter should you use, if you want to get the data from an access database?
What is a web based system?
What is difference between ispostback and autopostback in asp net?
When does a session actually start?
Define the term Web Garden?
Explain how to prepare culture-specific formatting in .net.
What is bson in web api?
In a Repeater control how one can provide an alternating color scheme ?
Explain the steps needed to be performed in order to create an animation in xaml?
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?
How to send a DataReader as a parameter to a remote client ?
What is an assembly? Explain its parts.
What is web router?