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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top