Subject of your post says you want intger value from textbox.
You can use
int i=int.Parse(Textboxvalue);
And then to a Database !!!!
Doing the database thing is the next major step,
But since the poster had asked for extracting the integer from the textbox, there are a lot of links you can get if you type it into a a search engine