Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Why did the textbox in repeater clear the text which I enter into it as I click the button?

UPDATE from OP:
C#
protected void Submit_Click(object sender, EventArgs e)
    {
        BillOfQuantitiesObj = new BillOfQuantitiesBAO();
        foreach (RepeaterItem rr in Repeater1.Items)
        {
            BillOfQuantitiesObj.ContRegNo = ContRegNo;
            BillOfQuantitiesObj.TenderNo = TenderNo;
            BillOfQuantitiesObj.TenderSNo = TenderSNo;
            BillOfQuantitiesObj.Items = ((Label)rr.FindControl("LbItem")).Text;
            BillOfQuantitiesObj.Description = ((Label)rr.FindControl("LbDescription")).Text;
            BillOfQuantitiesObj.Unit = ((Label)rr.FindControl("LbUnit")).Text;
            BillOfQuantitiesObj.Quantity = decimal.Parse(((TextBox)rr.FindControl("LbQuantity")).Text);
           BillOfQuantitiesObj.RateInNumbers = decimal.Parse(((TextBox)rr.FindControl("RateInNumbersTB")).Text);
            BillOfQuantitiesObj.RateInfigures = ((TextBox)rr.FindControl("RateInFiguresTB")).Text;
           BillOfQuantitiesObj.TotalAmount =decimal.Parse(((TextBox)rr.FindControl("TotalAmountTB")).Text);
        ContractorBillOfQuantitiesDAO.InsertBillOfQuantities(BillOfQuantitiesObj);
            }
    }

It is in last three textboxs whose value is entered at runtime.

thanks
Posted
Updated 23-Mar-11 7:43am
v3
Comments
Dalek Dave 23-Mar-11 12:44pm    
Edited for Grammar.

There is no way of answering this without seeing the code.
Please Provide It!

This will enable people to give a full response.

However...
When you do the call are you resetting it null?
Are you reinitialising it?
How are you handling the previously entered Data?

Straight away there are different possible answers, so you see why the code is important.
 
Share this answer
 
Comments
TweakBird 23-Mar-11 13:09pm    
Good Answer Dalek. Have a 5.
Textbox.text = string.empty;
 
Share this answer
 
I suspect that your binding is hosed up, but it's impossible to tell based on the code that you've provided.
 
Share this answer
 

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