tags:

views:

31

answers:

1

In InfoPath code behind is there a way to find the context under which the form is running. So we're looking at either the InfoPath client itself or whether it's running under InfoPath Forms Server.

Thanks.

+2  A: 

Add the following code to your FormEvents_Loading method. This checks whether the form is browser-based or not:

if (this.Application.Environment.IsBrowser) 
{ 
}
harryovers