473,473 Members | 2,060 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

There is no consumer connection point 'IMessageConsumer' on 'bla [2]'.

I created a static connected webpart.

INTERFACE:
public interface IMessage
{
string Message { get;}
}

USERCONTROL PROVIDER:
public partial class Control1 : System.Web.UI.UserControl, IMessage,
IWebPart
{
protected void Page_Load(object sender, EventArgs e)
{

}
[ConnectionProvider("Message","IMessageProvider")]
public IMessage GetMessage()
{
return this;
}
public string Message
{
get
{
return TextBox1.Text;
}
}
#region IWebPart Members (ETC)

USERCONTROL CONSUMER
public partial class Control2 : System.Web.UI.UserControl, IWebPart
{
protected void Page_Load(object sender, EventArgs e)
{

}

private IMessage _message;
[ConnectionConsumer("Message","IMessageConsumer",Al lowsMultipleConnections=true)]
void SetMessage(IMessage message)
{
this._message = message;
}

protected override void OnPreRender(EventArgs e)
{
if (_message != null)
Label1.Text = _message.Message;
base.OnPreRender(e);
}
#region IWebPart Members (ETC)

DEFAULT.ASPX:

<body>
<form id="form1" runat="server">

<div>
<asp:WebPartManager ID="WebPartManager1" runat="server"
Personalization-Enabled="true">
<StaticConnections>
<asp:WebPartConnection ID="conId"
ConsumerID="dataConsumer" ProviderID="dataProvider"
ConsumerConnectionPointID="IMessageConsumer"
ProviderConnectionPointID="IMessageProvider" />
</StaticConnections>

</asp:WebPartManager>
<asp:WebPartZone ID="WebPartZone1" runat="server">
<ZoneTemplate>
<uc1:Control1 ID="dataProvider" runat="server" />
<uc2:Control2 ID="dataConsumer" runat="server" />
</ZoneTemplate>
</asp:WebPartZone>
&nbsp;&nbsp;
</div>
</form>
</body>

And I get this error :"There is no consumer connection point
'IMessageConsumer' on 'bla [2]'. "... Checkded it with multiple
tutorials, but can't find what I'm doing wrong.

Hope someone can help me!
Regards,
Patrick

Jun 27 '07 #1
1 1646
USERCONTROL CONSUMER
public partial class Control2 : System.Web.UI.UserControl, IWebPart
{
protected void Page_Load(object sender, EventArgs e)
{

}

private IMessage _message;

[ConnectionConsumer("Message","IMessageConsumer",Al lowsMultipleConnections=*true)]
void SetMessage(IMessage message)
{
this._message = message;
}
Solved it, I forgot to make the SetMessage public ;-)

Jun 28 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Evan Simpson | last post by:
WEBoggle needs a new game board every three minutes. Boards take an unpredictable (much less than 3min, but non-trivial) amount of time to generate. The system is driven by web requests, and I...
2
by: Teddy | last post by:
How can I open a TCP Connection to another host in C++? fopen does not work (like in other languages). Thanks Teddy
3
by: Nimai Malle | last post by:
I have not had any luck searching for a simple, simple example that calls a method on an object given a SOAP string. Here's what I'm looking for (in pseudocode): string SOAPCall = "bla bla...
1
by: Grisha0 | last post by:
Hi, i'm trying to connect to a datbase across my LAN. i'm using a standard connetion string... although i got error.. sorry for my english.. best regards grisha ...
1
by: toke | last post by:
I've build a DLL in VB.net that handles all sorts of business logic. This DLL accecesses a SQL server for some data in the following way: <Begin pseudo-code snip> Open a Connection Con = new...
0
by: =?Utf-8?B?TWFyYyBXb29sZnNvbg==?= | last post by:
Hello, I can't seem to find any information on how best to implement multiple connections on a consumer web part and was wondering if anyone could point me in the right direction. I have...
15
by: Sylvie | last post by:
I have a static function in a class, everytime I call this function, I am creating a SQLconnection, open it, use it, and null it, All my functions and application logic is like this, Every...
2
by: PengYu.UT | last post by:
Hi, In python, triple quote (""") can be used to quote a paragraph (multiple lines). I'm wondering if there is any equivalent in C++. For the following code, I could write the long string in a...
11
Dheeraj Joshi
by: Dheeraj Joshi | last post by:
I have been trying to register a permanent event consumer in a remote machine, i am able to register for an event, but when the event occurs in remote machine it wont forward back the response... ...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.