[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Problem to take value of TextBox in C#

Posted on 2011-03-14
4
Medium Priority
?
229 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 45

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

Industry Leaders: 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 Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

656 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