Thursday 12 April 2007

Check if current form client is rich or thin by code

Since you can make the InfoPath form both web/Infopath compatible, sometimes you might need to tell if the user is using a thin-client with a web browser to fill in the form or a rich client instead because functionalities like some data validation, popup message, custom task pane etc, will not appear in the web browser at all. It's easy to tell by using property IsBrowser


//if it's rich client user environment
if(! Application.Environment.IsBrowser)
{
//do something that is only available for client with Infopath installed
...
}

No comments: