Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a webpart with a toolpart class. The toolpart renders fine, but how do I read/"get" the toolpart's value from the webpart class? ie if a button is pressed.

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

If its a custom ToolPart property you can check this MSDN link that is explaining you how to get toolpart values within a webpart

Getting custompropertytoolpart in a webpart

EDIT

This link is more relevant to your question

MSDN getting/Updating toolpart class properties

To obtain a reference to the Web Part to update its properties, the ToolPart class has an accessor property called ParentToolPane that returns a reference to the ToolPane object. The ToolPane object is the class that keeps track of which Web Part is selected, and in turn, it has an accessor property called SelectedWebPart that returns a WebPart object for the current Web Part.

Hope it helps :)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.