Reputation: 4869
I have a Masterfile that has a header control with a button, and the ContentPlaceHolder which would be another page with multiple text boxes.
When I press the button in the header, I need to iterate through all the text boxes and grab their text, how exactly would I do this using C#?
Upvotes: 1
Views: 147
Reputation: 1718
Check the ContentPlaceHolder for null and if that succeeds, loop through all of the placeholder's controls, grabbing the text from all the TextBoxes. Alternatively, you could use the ContentPlaceHolder's FindControl
method.
Upvotes: 2