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 is sta?
How many types of cookies are available in asp?
What is sdlc process?
How to create a db connection at one place/page so that we can use that connection for all pages/forms/windows.what r the steps ned to be performed if question not clear,let me know
In What Order Do The Events Of An Aspx Page Execute. As A Developer Is It Important To Undertsand These Events?
What is webresource axd?
What is boxing and unboxing in asp.net?
Explain the difference between Web Garden and Web Farm?
How would you get asp.net running in apache web servers?
Which method do you use to kill explicitly a users session?
What is application and session in asp.net?
What is State Management in .Net and how many ways are there to maintain a state in .Net? What is view state?
What are validator? Name the validation controls in asp.net?
What is application session?
What is the parent class of all web server control?