3
Answers

Updatepanel issue with Script manager

Pankaj Singh

Pankaj Singh

15y
6.4k
1
Hi,

I have an issue using Upadtepanel, if i use it on the form the Gridview does not seem to work. Is there a way out for this?

Please help me

Thanks

Pankaj Singh
Answers (3)
3
Sachin Singh

Sachin Singh

NA 55.8k 87.9k 2y
Yes we all were wrong use this
  1. numMaxLimit.Text =Convert.ToString(Convert.ToDecimal(strArray[1]));    
 
Accepted
4
Sachin Singh

Sachin Singh

NA 55.8k 87.9k 2y
Have you tested this?
 
  1. numMaxLimit.Text = Convert.ToDecimal(strArray[1]);  
3
Amit Mohanty

Amit Mohanty

16 52.2k 6.1m 2y
try this
  1. numMaxLimit.Text = Convert.ToDecimal(strArray[1]).ToString();    
  2. // or    
  3. numMaxLimit.Text = decimal.Parse(strArray[1]).ToString();  
3
Amit Mohanty

Amit Mohanty

16 52.2k 6.1m 2y
Hey you can use both Convert.ToDecimal() and decimal.Parse()
  1. numMaxLimit.Text = Convert.ToDecimal(strArray[1]);  
  2. // or  
  3. numMaxLimit.Text = decimal.Parse(strArray[1]); 
3
Gajendra Jangid

Gajendra Jangid

25 41.2k 2.3m 2y
CHeck with below line
  1. numMaxLimit.Text = Convert.ToDecimal(strArray[1]);  
 
2
shah Momin

shah Momin

NA 176 24.3k 2y
  1. ConfigurationBLL configurationBLL = new ConfigurationBLL();  
  2.   
  3.             if (lblSpotID.Text == "ID")  
  4.             {  
  5.                 int num1 = (int)MessageBox.Show("Please select a spot""Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);  
  6.             }  
  7.             else if (txtSpotName.Text == "")  
  8.             {  
  9.                 int num2 = (int)MessageBox.Show("Please enter a spot name""Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);  
  10.             }  
  11.             else if (numMaxLimit.Value < numMaxLimit.Minimum || numMaxLimit.Value > numMaxLimit.Maximum)  
  12.             {  
  13.                 int num3 = (int)MessageBox.Show("Please enter a valid spot max limit""Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);  
  14.             }  
  15.             else if (!rbtnOnSpot.Checked && !rbtnOffSpot.Checked)  
  16.             {  
  17.                 int num4 = (int)MessageBox.Show("Please mark on/off on selected spot""Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);  
  18.             }  
  19.             else  
  20.             {  
  21.                 int isOn = rbtnOnSpot.Checked ? 1 : 0;  
  22.                 configurationBLL.SaveDutySpot(int.Parse(lblSpotID.Text), txtSpotName.Text, (int)numMaxLimit.Value, isOn);  
  23.                 int row = int.Parse(lblSpotRow.Text);  
  24.                 Button controlFromPosition = (Button)tblDutySpot.GetControlFromPosition(int.Parse(lblSpotCol.Text), row);  
  25.                 controlFromPosition.Text = txtSpotName.Text + Environment.NewLine + (object)numMaxLimit.Value;  
  26.                 if (isOn == 1)  
  27.                     controlFromPosition.BackColor = Color.Green;  
  28.                 else  
  29.                     controlFromPosition.BackColor = Color.Red;  
  30.                 int num5 = (int)MessageBox.Show("Spot updated successfully""Duty Spot", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);  
Error On This Line
 
  else if (numMaxLimit.Value < numMaxLimit.Minimum || numMaxLimit.Value > numMaxLimit.Maximum)
 
   configurationBLL.SaveDutySpot(int.Parse(lblSpotID.Text), txtSpotName.Text, (int)numMaxLimit.Value, isOn);
 
controlFromPosition.Text = txtSpotName.Text + Environment.NewLine + (object)numMaxLimit.Value;
 
 
2
shah Momin

shah Momin

NA 176 24.3k 2y

Thank You For ALL

 

Sachin Singh Pm Message 

2
shah Momin

shah Momin

NA 176 24.3k 2y
YEs
 
2
shah Momin

shah Momin

NA 176 24.3k 2y
Cannot implicitly convert type 'decimal' to 'string'