clear all values from text boxes while logging out
-
I have windows application when i log out from the application and login again all values are pre filled in textboxes ans list boxes i want that they get cleared when i logout
Ankit Aneja "Nothing is impossible. The word itself says - I M possible"
-
I have windows application when i log out from the application and login again all values are pre filled in textboxes ans list boxes i want that they get cleared when i logout
Ankit Aneja "Nothing is impossible. The word itself says - I M possible"
do i have to reset all the textboxes or is there also some other way to do it
Ankit Aneja "Nothing is impossible. The word itself says - I M possible"
-
do i have to reset all the textboxes or is there also some other way to do it
Ankit Aneja "Nothing is impossible. The word itself says - I M possible"
I am doing like txtbox1.clear(); textbox2.clear(); can i do it in one go with a single function for whole form
Ankit Aneja "Nothing is impossible. The word itself says - I M possible"
-
I have windows application when i log out from the application and login again all values are pre filled in textboxes ans list boxes i want that they get cleared when i logout
Ankit Aneja "Nothing is impossible. The word itself says - I M possible"
You can iterate over the controls collection and when you find textboxes or listboxes, clear them.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
-
You can iterate over the controls collection and when you find textboxes or listboxes, clear them.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
can u give me sample code how will i do that
Ankit Aneja "Nothing is impossible. The word itself says - I M possible"
-
can u give me sample code how will i do that
Ankit Aneja "Nothing is impossible. The word itself says - I M possible"
Hello, Just use a foreach over your Controls Collection.
foreach(Control c in this.Controls)
{
Label actlabel = c as Label;
if(actlabel != null)
{
actlabel.Clear();
}
else
{
ListBox actlistbox = c as ListBox;
if(actlistbox != null)
actlistbox.Items.Clear();
}
}All the best, Martin