Monday, 29 July 2013

Find controls inside table in asp.net c#

 string allTextBoxValues = "";
        foreach (Control c in tableid.Controls)//table control
        {
            foreach (Control childc in c.Controls)//table row
            {
                foreach (Control dd in childc.Controls)//table cell
                {
                    if (dd is TextBox) //controls
                    {
                        allTextBoxValues += ((TextBox)dd).Text + ",";
                    }
                }
               
            }
        }

No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...