int.TryPrase is great and all, but there is only one problem...it takes at least two lines of code to use:
int.TryPrase
int intValue; string stringValue = \"
int val2 = "asd".AsInt(-1); //Output : -1 int val3 = "123".AsInt(-1); //Output : 123
You need to have System.Web.WebPages namespace.
System.Web.WebPages