Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ProfileEventHandler Delegate

 

Represents the method that will handle the Personalize event of a ProfileModule.

Namespace:   System.Web.Profile
Assembly:  System.Web (in System.Web.dll)

public delegate void ProfileEventHandler(
	Object^ sender,
	ProfileEventArgs^ e
)

Parameters

sender
Type: System::Object^

The ProfileModule that raised the Personalize event.

e
Type: System.Web.Profile::ProfileEventArgs^

A ProfileEventArgs that contains the event data.

The ProfileEventHandler delegate is defined for the Personalize event of the ProfileModule class. You can access the Personalize event of the ProfileModule class in the Global.asax file for your ASP.NET application using the Profile_Personalize global event, as shown in the example for this topic.

You can use the Personalize event to specify a custom user profile. If the Profile property of the ProfileEventArgs parameter specified for the Personalize event's ProfileEventHandler is set to a non-null value when the Personalize event completes, then the ProfileModule will use that value for the Profile property of the current HttpContext.

The following code example shows the Personalize event declared in the Global.asax file for an application. The event code loads a user profile for a user based on role membership.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft