Justen
Justen

Reputation: 4869

How would I use a control to get info from another page part of the same masterfile

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

Answers (1)

Nick
Nick

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

Related Questions