1. You could call the ToInt32 method to convert an input string to an int:
int numberVar = Convert.ToInt32(“37”);
2.You could also convert a string to an int through the Parse method of the System.Int32 struct:
int numberVar = Int32.Parse(“-37”);
Related TutorialsHow to preserve member variables for an ASP.NET page in C#
How to transfer information between pages in ASP.NET using a query …