1
Reply

Programing in WPF

Rinki

Rinki

7 years ago
239

 i want to create a function to clear all textbox
 ============================================
private void BTN_FORM_Click(object sender, EventArgs e)
{
foreach (Control x in Controls)

//foreach (Control c in Controls)
{
if (c is TextBox)
{
c.Text = "";
}
}
===============================
 this code is giving error
"  the name 'controls' does not exist in current context" ;
 
Please help its very urgent
Thanks in advance.
 

Answers (1)