Explicitly clear:
private void ClearTextboxes()
{
textbox1.Text = String.Empty;
}
You can also loop through all of them and clear all. Explicit coding, even
when not necessary, makes the code clearer. In other words, I would clear
them explicitly, even if .NET did it for me. Reasoning: They may find that
they need to switch defaults some day (there is a 2.0 discussion on the
ADO.NET model right now).
---
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"jw*****@gmail.com" wrote:
When a page does a post back and there is data in a textbox, that
textbox will get automatically repopulated with that data due to the
posting of the form. Disabling viewstate has no affected on textbox
controls, so how do you make it so that the text box value is cleared
out on postback?