input string was not in a correct format?

Posted by Sudheep.grandhe under C# on 11/11/2011 | Points: 10 | Views : 15534 | Status : [Member] | Replies : 9
Hi,

following error has occured in my coding
Error:.input string was not in a correct format.
int id = Convert.ToInt32(label5.ToString ());

Best,
Sudheep.



Responses

Posted by: Blessyjees on: 11/11/2011 [Member] Bronze | Points: 25

Up
0
Down
Hi,

This error means the value of label5 canot convert to number i.e this is not numeric data and convert.Int32(label5.Text)

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kasibabu on: 11/11/2011 [Member] Starter | Points: 25

Up
0
Down
Hi
Sudheep

int id = Convert.ToInt32(label5.ToString () );----wrong
change like below
int id=Convert.ToInt32(label5.Text ); -----------------working fine


Regards,
Kasi babu

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: perfectchourasia-9163 on: 11/15/2011 [Member] Starter | Points: 25

Up
0
Down
thanks hasi i also found this problem once.

ER sandeep chourasia
sandeepchrs@yahoo.com (on facebook)
http://www.aspnetcodes.com/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pratyusha on: 6/21/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,

following error has occured in my coding
Error:.input string was not in a correct format.
var EmpId = Convert.ToInt32(scmd.ExecuteScalar());

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pratyusha on: 6/21/2013 [Member] Starter | Points: 25

Up
0
Down

Hi,
following error has occured in my coding
Error:input string was not in a correct format.
int Empid=convert.ToInt32(scmd.selfcore);

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pratyusha on: 6/21/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,
following error has occured in my code
Error:input string was not in a correct format

int EmpId=Convert.ToInt32(scmd.Selfscor);

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pratyusha on: 6/21/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,
following error has occured in my code
Error:input string was not in a correct format

int EmpId=Convert.ToInt32(Selfscore);

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pratyusha on: 6/21/2013 [Member] Starter | Points: 25

Up
0
Down
y no one is responding........ for my error


Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bela374 on: 6/22/2013 [Member] Starter | Points: 25

Up
0
Down
This error means the value of label5 canot convert to number right...???

http://www.gadgetssea.com/
http://www.gadgetssea.com/time-and-eternity-us-box-art-revealed/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response