Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem understanding webparts

Status
Not open for further replies.

astensland

Programmer
Sep 24, 2003
9
0
0
NO
I have created two webparts that interact (is connected). One implements IParametersOutConsumer, the other IParametersOutProvider.
To do this, I had to follow several steps, which included implementing some methods, and overriding some methods. My webparts are very simple. One has a button, when you click that, a string parameter is sent to the other webpart, which displays that string in a textbox. And it works.

What I have problems with, is the dataflow between the two webparts?? When I click the button, which metod is called? Which metod does that method call and so on… Because now I am not sure where to put stuff when I want to expand my webparts.

Below I have listed the methods that must be implemented for the Provider part:

public override void EnsureInterfaces()
public override ConnectionRunAt CanRunAt()
public override void PartCommunicationConnect(string interfaceName,
WebPart connectedPart,
string connectedInterfaceName,
ConnectionRunAt runAt)
public override void PartCommunicationInit()
public override void PartCommunicationMain()
public override InitEventArgs GetInitEventArgs(string interfaceName)
protected override void RenderWebPart(HtmlTextWriter output)
protected override void CreateChildControls()

And for the Consumer part:

public override void EnsureInterfaces()
public override ConnectionRunAt CanRunAt()
public override void PartCommunicationConnect(string interfaceName,
WebPart connectedPart,
string connectedInterfaceName,
ConnectionRunAt runAt)
public void ParametersOutProviderInit(object sender, ParametersOutProviderInitEventArgs , parametersOutProviderInitEventArgs)
public void ParametersOutReady(object sender, ParametersOutReadyEventArgs parametersOutReadyEventArgs)
public void NoParametersOut(object sender, EventArgs eventArgs)
protected override void RenderWebPart(HtmlTextWriter output)

Can anyone please explain to me the flow here?? Which method calls which, when they are called, maybe their purpose etc. A diagram would help (but not needed…).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top