How to use ViewState in C#

You as software developer can use code to add information directly to the view state collection of the containing page and recover it later after the page is posted back. The type of information you can store includes not only the simple data types, but your custom objects too.   The view state collection is provided by […]

How to convert string to int in C#

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 disable a button after click in ASP.NET
How to apply CSS style in the Label control from code-behind […]

Recommended ASP.NET Examples