|
-
Jan 3rd, 2003, 02:20 AM
#1
-
Jan 4th, 2003, 11:34 AM
#2
Fanatic Member
heh, one would think so... i thought so too, but i just made up a little page, and i can see that's not the case.... very puzzling, that is....
anyways, if you need to get rid of the text, you can simply put something in the Page_Load Event... like:
VB Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Response.Write(TextBox1.Text)
TextBox1.Text = ""
End Sub
That would take you to whatever you need to do when you click the submit button or whatever, then after it's finished using the TextBox Value, it'll set it to nothing, so that when the page displays again, the textbox is empty...
I'm quite puzzled by this... i tried even setting the viewstate to disabled in the <%@Page %> directive, but it still came up everytime... very strange, but if it just won't work out for you, that sort of code should work just fine.
-
Mar 20th, 2003, 11:16 PM
#3
Addicted Member
Well, here's an article that sort of explains what's going on, but when I changed the background color of a textbox, it still persisted each postback. A list of which properties are and are not persisted would be helpful.
Actually, I was wrong about the textbox color persisting. It doesn't persist if you set it as shown in the article. (I had set it in the html.)
Last edited by csnyder; Mar 20th, 2003 at 11:23 PM.
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
|