?
Solved

Problem to take value of TextBox in C#

Posted on 2011-03-14
4
Medium Priority
?
224 Views
Last Modified: 2012-05-11
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...
0
Comment
Question by:tenriquez199
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 35136181
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
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 35136184
How do you test what value is saved in the database?
0
 
LVL 18

Accepted Solution

by:
Ajay Sharma earned 2000 total points
ID: 35136231
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
 
LVL 1

Author Closing Comment

by:tenriquez199
ID: 35335724
yks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question