Handling events from a class in an asp.net page

Discussion in 'ASP .Net' started by Andy B., Feb 21, 2010.

  1. Andy B.

    Andy B. Guest

    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
    examples?
     
    Andy B., Feb 21, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shiv
    Replies:
    0
    Views:
    482
  2. JezB
    Replies:
    5
    Views:
    447
  3. Replies:
    0
    Views:
    358
  4. S.T
    Replies:
    4
    Views:
    426
  5. Chris

    Events Events Events Please Help

    Chris, Aug 30, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    374
    Chris
    Aug 30, 2005
Loading...

Share This Page