Problem to take value of TextBox in C#

Hello... well i need take a value of textbox

I have a textbox in my page and the user, insert a new value, next when click on button the information is save in DB... but I recieve 0 that it's the value of TextBox before changed...

I try with

string value= TextBox1.Text;

but it doesnt work...
LVL 1
tenriquez199Asked:
Who is Participating?
 
Ajay SharmaConnect With a Mentor Commented:
Is your textbox value getting set into the Page_Load metho?
If yes then set it inside the below condition:

If (Page.IsPostback==false)
{
txt.Text = "0";
}


Also, post your page code, it will help us in better understanding the code.
0
 
DhaestCommented:
What kind of application are we talking ? Windows or webbased ?
When you execute the update, does it store the new value or is the value never changed ?
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
How do you test what value is saved in the database?
0
 
tenriquez199Author Commented:
yks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.