Luis Valencia
Luis Valencia

Reputation: 33988

Interaction between custom forms and event receivers

How can we interact with custom forms and event receivers? How can we talk to custom fields (asp controls) within the custom form from an event recievers?

I searched but cant find something like that or maybe I am not using the right keywords.

Upvotes: 1

Views: 101

Answers (1)

chase huber
chase huber

Reputation: 794

In the event receiver you do not have access to any of the controls on a form. What you do have is access to the SPItemEventProperties object which has the BeforeProperties and AfterProperties, er... properties. These are hashtables which contain the names of the SPListItem's fields and their corresponding values (from the form or from the existing item). You can use the event receiver to inspect these values and take a particular action, or even cancel the event.

Upvotes: 2

Related Questions