input string was not in a correct format, lookup additional column

Problem: I have a list, which have a Lookup(Venue)+additional column as ID(“Venue:ID”) you can see in the above picture, when i try to get the value of the “Venue:ID” and convert into int32 through my code, it gives me an error input string was not in a correct format,

To mistake i was making is that, lookup always bring value like some this “2;#2”;

so you can use the split method to get the id or use LookUp properties.

 

One thought on “input string was not in a correct format, lookup additional column

Leave a comment