Hi Martin,
Justin's suggestion sounds very good. If that didn't solve your problem,
then I suggest debugging. I think that some code is changing the value and
debugging can help you find that code.
First, look through the code to see if you can spot the error. Look at your
server and client code (java script). Then choose break points and debug
your application as described in these articles. If you see that the value
changes, then move your break points to zero in on the line of code causing
the problem.
316726 HOW TO: Debug an ASP.NET Web Application
http://kb/article.asp?id=Q316726
317699 HOW TO: Debug Client-Side Script in Visual Basic .NET
http://kb/article.asp?id=Q317699
Thank you, Mike
Microsoft, ASP.NET Support Professional
Microsoft highly recommends to all of our customers that they visit the
http://www.microsoft.com/protect site and perform the three straightforward
steps listed to improve your computer’s security.
This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
Reply-To: "S. Justin Gengo" <sj*****@aboutfortunate.com>
From: "S. Justin Gengo" <sj*****@aboutfortunate.com>
References: <#Y**************@TK2MSFTNGP11.phx.gbl>
Subject: Re: Textbox in ASP
Date: Tue, 11 Nov 2003 10:27:43 -0600
Lines: 44
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <u6**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 63.238.248.99
Path:
cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTN GP08.phx.gbl!TK2MSFTNGP10.
phx.gbl Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:190081
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
Martin,
Is it possible that your code is setting the text box value on page load?
If so use:
If Not IsPostBack Then
'---Set textbox text on the first page load only
End If
My guess is that you may be overwriting the new value when the client
posts back to the server.
Sincerely,
--
S. Justin Gengo, MCP
Web Developer
Free code library at:
www.aboutfortunate.com
"Out of chaos comes order."
Nietzche
"Martin" <ma**********@avis.at> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... How can it be that TextBox.Text has an old value when I read it in to a
variable and I can at the same time see the new value in my browser. I
would guess that it has someting to do with a webpage lifecykle and viewstate
but I cant figure out how. If anyone has experiences like this I would
appreciate some advice. If not I will update this question tomorrow,
now I will go home.
Regards
Martin