Can you edit data in the Repeater control?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / sunayana
No, it just reads the information from its data source
Is This Answer Correct ? | 3 Yes | 3 No |
Answer / vishal
You can't edit repeater control but you can design it by
your own
Is This Answer Correct ? | 2 Yes | 2 No |
How to execute a stored procedure.and how to call it form a asp page
To redirect the user to another page which method do we use without performing a round trip to the client?
how to create textboxes dynamically and insert textbox text into sql database
What is the use of asp.net web api?
what is diffrent between asp & asp.net
I create small website, i want accept all the browser this website? what will do?
What is pre-init event in ASP.NET 2.0 page life cycle?
Asp.net - How to find last error which occurred?
different architectures of asp.net?
hi everyone. can anyone send me wipro interview questions on .net. plz its urgent
How would you turn off cookies on a page of a website?
What is the difference between session and viewstate in asp.net?