Retrieving changed TextBox values

J

Jon J.

Hi everyone,

When I change the original value at runtime in a TextBox control, and then
try to retrieve this new value from a Button.OnClick event, I instead get the
original TextBox.Text value.

Has anyone seen this before or know what might be happening?

Thanks,
 
T

Tarakeshwar L

Hi,

Check if the AutoPostBack property of the Textbox is false. If it is
true then make it false.
 
K

Ken Nicely

Are you loading the initial value when the page loads? If so, it could be
getting reset when the page posts back, because the on_click will not fire
until after the page load when the page is posted back. If this is the case,
make sure your intitial setting is of the textbox value is inside an If not
postback...end if construct.

Ken
 
M

Michael

Please ignore this as it has nothing to do with your question. I had too
many windows open and replied to the wrong msg..Sorry.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top