In the codebehind of a page.
How do i get hold of a webpart that exist on the page,
then add properties to that webpart using c#.
The webpart exists withing a webpartzone.
Do i need to do anything with SPWebPartManager?
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.
Use SPWeb.GetLimitedWebPartManager. The following example demonstrates updating a property in a list view web part:
Instead of
default.aspxyou need to use the name of the current page relative to the SPWeb.