Thursday, March 22, 2012

Strange Issue egarding ASP:textbox control.

I have a form. I fill the text property of all the textboxes on the form to
display information to the user. If the user changes a value and clicks
save. I save the information to the database.

This sounds all well and good however the record does not get updated, in
fact I have traced it to the fact that the textbox.text property is not
being updated after the user changes the value.

Please, if you have experienced anything like this, please help. This is
very frustrating.That's not much information to go on but I suggest looking for something in
your onload that is rebinding or reloading the textbox with the original
data before you get to the click event of your save button. Remember that
onload is called before the button event.

Also, make sure you're only setting the value of the textbox from the
database when IsPostBack is false. If you're setting it in every case, you
will reset it before you get to the click event.

Good luck,

Dale

"Red" <wreyes@.optonline.net> wrote in message
news:OTvW$ONUEHA.2408@.tk2msftngp13.phx.gbl...
> I have a form. I fill the text property of all the textboxes on the form
to
> display information to the user. If the user changes a value and clicks
> save. I save the information to the database.
> This sounds all well and good however the record does not get updated, in
> fact I have traced it to the fact that the textbox.text property is not
> being updated after the user changes the value.
> Please, if you have experienced anything like this, please help. This is
> very frustrating.
Hey thanks alot. I can not beleive I made such a simple mistake. For days I
have been looking at everything accept for when I was displaying the data.

Anyway, thanks again.

"DalePres" <don-t-spa-m-me@.lea-ve-me-a-lone--.com> wrote in message
news:e05xBXNUEHA.2564@.TK2MSFTNGP11.phx.gbl...
> That's not much information to go on but I suggest looking for something
in
> your onload that is rebinding or reloading the textbox with the original
> data before you get to the click event of your save button. Remember that
> onload is called before the button event.
> Also, make sure you're only setting the value of the textbox from the
> database when IsPostBack is false. If you're setting it in every case,
you
> will reset it before you get to the click event.
> Good luck,
> Dale
> "Red" <wreyes@.optonline.net> wrote in message
> news:OTvW$ONUEHA.2408@.tk2msftngp13.phx.gbl...
> > I have a form. I fill the text property of all the textboxes on the form
> to
> > display information to the user. If the user changes a value and clicks
> > save. I save the information to the database.
> > This sounds all well and good however the record does not get updated,
in
> > fact I have traced it to the fact that the textbox.text property is not
> > being updated after the user changes the value.
> > Please, if you have experienced anything like this, please help. This is
> > very frustrating.

0 comments:

Post a Comment