Click here to Skip to main content
15,901,368 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
waitng for ur valuable suggesitions and answers
your sincer regard Mian Sahib Jan
Posted
Comments
Schatak 26-Mar-14 7:35am    
what exactly you want ? Elaborate bit more

1 solution

HI,

u can try and run a for loop for repeater items and get all the values.

here is some sample code you may change based on your control and logic.

C#
for (int index = 0; index < rptCost.Items.Count; index++)
                    {
                        
                        HiddenField hfCostID =rptCost.Items[index].FindControl("hfCostID") as HiddenField;
                        TextBox txtCost = rptCost.Items[index].FindControl("txtCostValue") as TextBox;
                        TextBox txtEPvalue = rptCost.Items[index].FindControl("txtEPvalue") as TextBox;
                        Label lblEpvalue = rptCost.Items[index].FindControl("lblEpvalue") as Label;
                        Label lblEc = rptCost.Controls[rptCost.Items.Count + 1].FindControl("lblEc") as Label;
                        Label lblEp = rptCost.Controls[rptCost.Items.Count + 1].FindControl("lblEp") as Label;
                        Label lblDiff = rptCost.Controls[rptCost.Items.Count + 1].FindControl("lblDiff") as Label;

                        
                      

                    }


this way you can find the controls from your repeater and use the values to insert data in the database on button click.
 
Share this answer
 
Comments
Mian Sahib Jan 1-Apr-14 7:45am    
yes this is the good idea it work for me thanks alot ravikhoda
again thanks alot

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900