Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: TextBox problems


Message #1 by Terrence Joubert <Terrence@v...> on Fri, 19 Jul 2002 09:06:08 +0400
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C22EE1.FE93DCA0
Content-Type: text/plain

I've got an ASP .NET application. The user searches for an item in the
database and the details are displayed inside TextBox
(System.Web.UI.WebControls.TextBox) controls on a web form. When ASP .NET
code retrieves data values from the database and assigns them to the Text
property of the TextBox, the application works fine and data is displayed
properly on the web form. The user on the client has the ability to edit
data in these TextBox controls. The problem I am getting is that when I read
the Text property on the server (after the user had been editing), the value
remains the same value that was earlier retrieved from the database and
assigned to the control.
 
I do not know if this is a feature in ASP .NET or a bug and I am looking for
a way around it. A little help from anyone will be very much appreciated. 
 
Terrence J. Joubert
Software Engineer
VCS, PO BOX 1000
Victoria
 

Message #2 by "Mingkun Goh" <mangokun@h...> on Fri, 19 Jul 2002 07:09:43
You maybe setting the textbox with the database value everytime your page 
is post-back, that's why after the user had finished editing and submitted 
the page, the textbox get the datbase value back in it.

Move your database code into a button event instead of the page_load event,


Previous message:
I've got an ASP .NET application. The user searches for an item in the
database and the details are displayed inside TextBox
(System.Web.UI.WebControls.TextBox) controls on a web form. When ASP .NET
code retrieves data values from the database and assigns them to the Text
property of the TextBox, the application works fine and data is displayed
properly on the web form. The user on the client has the ability to edit
data in these TextBox controls. The problem I am getting is that when I 
read
the Text property on the server (after the user had been editing), the 
value
remains the same value that was earlier retrieved from the database and
assigned to the control.
 
I do not know if this is a feature in ASP .NET or a bug and I am looking 
for
a way around it. A little help from anyone will be very much appreciated. 
 
Terrence J. Joubert
Software Engineer
VCS, PO BOX 1000
Victoria

  Return to Index