4
Answers

urgent assistance

Photo of Carlos kambui

Carlos kambui

10y
824
1
 kindly help when i add codes to my project on form load, after clicking button no response when i delete the codes it work what could be the problem

Answers (4)

0
Photo of Upendra Pratap Shahi
190 10.4k 2.1m 10y
Set Button AutoPostBack property is true..
This may work for you dear?
0
Photo of Pankaj  Kumar Choudhary
71 26.6k 13.5m 10y
Hello @Carlos there is not any error in your code but can not understand what is problem occur with you can you debug your program using break point and check where is execution of program in going on button  click .........
0
Photo of Carlos kambui
NA 499 135.1k 10y
when i load my form on load it behaves so
  sumbalance();
totalamoutpaid(); 
private void sumbalance()
{
int total = 0;
for (int i = 0; i < dgFeesstructure.Rows.Count; i++)
{
for (int col = 0; 6 < dgFeesstructure.Columns.Count; col++)
total += Convert.ToInt32(dgFeesstructure.Rows[i].Cells[6].Value);
txtTotalTotalAmountpaid.Text = total.ToString();
}
}
private void totalamoutpaid()
{
int sum = 0;
for (int i = 0; i < dgFeesstructure.Rows.Count; ++i)
{
sum += Convert.ToInt32(dgFeesstructure.Rows[i].Cells[1].Value);
}
txtTotalbalance.Text = sum.ToString();
}
 
0
Photo of Nanhe Siddique
NA 2.5k 372.2k 10y
if i m write, you have written event on button but it is not  fire on click . for this
try
 AutoPostBack="true" while declaring button 
 
or
Read this Link
 
or
 
show your code if given code or link not help , if it help you Mark Accept Answer