if you need the value of the text field at another point in the application, then it is best to choose a session. therefore, the value of the text field is assigned to the session variable. and when u wants this value then converts it to decimal and uses this session variable ...
Session["SessionVariableName"] = txtpass.Text; decimal VariableName = (decimal)Session["SessionVariableName"];
Hope this helps you ....
source share