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
childNode.Text = (cmyrows[c][0]).ToString(); //convert int to string
childNode1.Text = (string)cmyrows[c][2]; //type cast: to specify string to string
Comments
Post a Comment