foreach (Control ctrl in Page.Controls) 
    {
        if (ctrl is TextBox)
        {
            if (((TextBox)(ctrl)).Text == "")
            {  
               helpCalss.MessageBox("Please fill the empty fields", this);
                    return;  
            }  
        }  
    }  
I'm using asp.net and i have an inserting page with texboxes and i need to check if the texboxes in the page are empty and if so i need to show a message box with the empty textbox
 
     
     
    