I'm assuming .net
at the very least due to the mvc4
comment.
Are you looking to interpret non-ints to be the empty string?
string i = "123";
string j = "ft1b";
int temp;
i = int.TryParse(i, out temp) ? i : "";
if you need to do this in javascript, you can use the isNaN() function instead of TryParse