Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Handling events from a class in an page

Thread Tools

Handling events from a class in an page

Andy B.
Posts: n/a
I have a class called Headline. It is a data object that represents a
Headline (news article) for use on a website. It (the headline object) will
have events linked to it. Some of the events will be something like:
1. Saving - just before the Headline gets sent to the database.
2. Saved - just after the Headline got sent to the database
3. Deleting - just before the Headline gets deleted.
4. Deleted - just after the Headline is deleted.

Just for a few examples. There could be quite a few more, but I am still in
the planning stage right now and haven't come up with all of them yet. I
need to know a few things.

1. I have an IHeadline interface that defines what the actual Headline
should look like. This includes the events listed above.
2. I have the Headline itself (concrete object) which requires that I
implement the events listed above in the class itself.

How do I create the object, raise the events above and report back to the
page the Headline is used in on the events results?

I.E. In the Add.aspx page, I need to create a Headline, validate it (Saving
event), save it to the database (Saved event) and report back to the
Add.aspx page the final results (consume the Saved/Saving events of the
Headline object in the Add.aspx page itself). How would you do this using my

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Event-Handling: Using one single class for different events? S.T Java 4 05-21-2007 04:32 PM
Handling Page Events in the Master Page ASP .Net 0 12-04-2006 03:24 PM
Nested Class, Member Class, Inner Class, Local Class, Anonymous Class E11 Java 1 10-12-2005 03:34 PM
Events Events Events Please Help Chris ASP .Net Web Controls 0 08-30-2005 08:21 PM
Passing Variables between Web Page Events and HttpModule Events shiv ASP .Net 0 11-21-2003 04:29 PM