@if (ViewData.ModelMetadata.ModelType.ToString()
And I am not sure how to finish it. I want to test it against (first 3 chars to be Int or other numerical types (I guess I need to test for decimal)?Type objType = typeof(T); if (objType.IsPrimitive) { return (objType != typeof(bool) && objType != typeof(char) && objType != typeof(IntPtr) && objType != typeof(UIntPtr)) || objType == typeof(decimal); }in http://stackoverflow.com/questions/1130698/checking-if-an-object-is-a-number-in-c-sharp