Tag Archive for User Control

Sharing WebPart and User Control Properties

When creating a Visual WebPart, sometimes you want the main functionality to be contained within the user control and not the WebPart, so that, for example, you can use the WebPart on multiple pages, one where the WebPart is hosted and users can edit the properties and another where only the user control is loaded and no WebPart manager, or WebPart zones, are available to allow editing of the properties.

In the later case, the properties defined in the WebPart would either be set to default values or be retrieved from the query string.

Now, how to setup the user control to receive the WebPart’s property values when contained in a WebPart?
Read more


Get every new post delivered to your Inbox

Join other followers: