Error is coming on below code.
Input string was not in a correct format.
int f1 = Convert.ToInt32(lbfloor.Text); if (lbempid.Text == "3") { f1 = 1; } else { f1 = 2; }
akhter says: int f1 = Convert.ToInt32(lbfloor.Text);
int f1 = Convert.ToInt32(lbfloor.Text);
int
f1 = Convert.ToInt32(lbfloor.Text);
Change with below code to avoid exception.
int f1 = !string.IsNullOrEmpty(bfloor.Text) ? Convert.ToInt32(lbfloor.Text) : 0);
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.