About Me

My photo
a Dynamic and Energetic guy.....

Wednesday, December 31, 2008

Change the user data in "CCF session control"

Add the following code inside the button_Click event in the hosted windows application

Context objContext = new Context();
objContext.SetContext(this.Context.GetContext());

// CustomerFirstName is the property name that use to identify customers' first name

objContext["CustomerFirstName"] = "Now my name is chanaka";
ContextEventArgs contextEventArgs = new ContextEventArgs(objContext);
this.FireChangeContext(contextEventArgs);
this.NotifyContextChange(objContext);

1 comment:

samirmdesai said...

Thanks for the tip.

Will a "global" HostedControl also be notified using this mechanism? Not seeing the desired behavior in my prototype.

My Masters