Click here to Skip to main content
15,881,866 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello buddy

This is helpful for me, but i had other problem in below code
C#
TextBox txt = (TextBox)sender;
        GridViewRow gvr = (GridViewRow)txt.Parent.Parent;
        int i = gvr.RowIndex;
       
        txt = (TextBox)GridView1.Rows[i].FindControl("txtqty");
        str7 = txt.Text;
        if (i <= 0)
        {
            lbltotcost.Text =(Convert.ToInt32(lblpurchasecost.Text) * Convert.ToInt32(str7)).ToString();
            str3 = lbltotcost.Text;
        }
        else
        {
            lbltotcost.Text = (Convert.ToInt32(lblpurchasecost.Text) * Convert.ToInt32(str7)).ToString();
            str4=lbltotcost.Text;
        }
        str5 = str3;
        str6 = str4;

Here i want to store first value of textbox and go to have a loop for the second value.

My problem is first is not stored and becoming null so please can you help me for this.
Posted
Updated 5-Aug-13 7:11am
v3
Comments
Sergey Alexandrovich Kryukov 5-Aug-13 10:57am    
Where is text_changed and why do you think this is something one can "raise". There is no such event, so it should be some your function which you may or may not want to call... The title of the question makes no sense at all, so far; not sure about the rest of it...
—SA
govardhan4u 5-Aug-13 13:45pm    
do u mean that textbox value is not saved after text changed is hit?

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