|
-
May 21st, 2003, 01:14 PM
#1
Thread Starter
Member
How to change the textbox's text property
Hi,
I am new to ASP.net. I am working on a Web application by using C# and ASP.net. In the page_load event, all textboxes are loaded based on the default values. When the page is shown up, users can change the values in the textboxes and click save button on the page to update the default values. My problem is when I change value in box, for example form AB to CD, the value saved still is AB when I click save button. I used breakpoint to debut the code line by line and the text properity of the textbox is the old one(AB). It seems that the old value is remembered in somewhere in the page_load event.
Please help me.
Thanks
James
-
May 21st, 2003, 01:28 PM
#2
Code:
// IsPostBack tells you, as the programmer, if the user has hit a server side control with autopostback = true, in your case the button.
if (!IsPostBack)
{
// Your text box initialisation.
}
else
{
// Your database updates.
}
-
Jul 22nd, 2003, 12:18 PM
#3
yay gay
axion i really dont get that u posted..i am having the same problem when i fill some text boxes with some default text and want the user to put some own text..then i have a submit button that should save the settings but it is saving the old(default) settings..how should i avoid that?
\m/  \m/
-
Jul 22nd, 2003, 12:48 PM
#4
PowerPoster
If you guys post your code, I will show you what axion_sa is saying about the postback.
-
Jul 22nd, 2003, 05:28 PM
#5
Frenzied Member
This might be an hail mary, but I think they are using the html submit button and not an asp.net server control.
-
Jul 22nd, 2003, 05:30 PM
#6
yay gay
no no
i am using the asp.net one
\m/  \m/
-
Jul 22nd, 2003, 09:28 PM
#7
Frenzied Member
Post the code. This should be easy to solve.
-
Jul 22nd, 2003, 09:31 PM
#8
yay gay
i've wrote in another post but now i am changing a lot of things so i cant replicate that now..but i am having some problems with deletings cookies..could u plz take a look at my other cookie post? http://www.vbforums.com/showthread.p...hreadid=254616
\m/  \m/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|