Unable to cast object of type 'System.Int32' to type 'System.String'

I would say that you should probably always use the ".ToString()" method to cast any datatype into a string


childNode.Text = (cmyrows[c][0]).ToString(); //convert int to string      

 childNode1.Text = (string)cmyrows[c][2]; //type cast: to specify string to string        

Comments

Popular posts from this blog

How to retain the data annotations or class during modify a table in the database

Interview Questions

AJAX CONTROL