Hi,
I have a forum page called Chat.aspx which consist of the following controls:
Message
MessageSubmit
PostList
PostList is a repeater containing Message & MessageSubmit controls.
I include single instances of Message & MessageSubmit controls in Chat.aspx to display the first post (it's a Q&A type forum).
Subsequent messages are displayed in the PostList control.
The problem I have is that when I submit a reply to the first post (in Chat.aspx) an event is fired in MessageSubmit which is handled in Chat.aspx and binds the data to the Message control but the event it is supposed to fire and which Postlist should handle is always null so it doesn't fire and Postlist does not not refresh to display the new post.
It looks a bit like this:
Code:
public event NewPostCreatedHandler NewPostCreated;
protected void FirstPostReply_NewPostCreated(object sender, int postid)
{
BindPost();
if (NewPostCreated != null)
{
NewPostCreated(sender, postid);
}
}
Any ideas what I might be doing wrong?