Simple question but I can’t find anything on it, is it possible to get the contents of an asp:placeholder to a string? This would be great to do server side if it is possible.
Luke
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you just want the textual content of a placeholder:
Returns
for:"Hello World"
If you also want to get the html of the rendered control (and all of it’s child-controls):
For this aspx (the
GridViewis databound with some sameple data):this html will be generated (depends on the browser):
Note that you need to change your page directive to
and to override
VerifyRenderingInServerFormin thePagewhen calling
RenderControlmanually.