On this page you will find some sample code and explanations of how 51Degrees device detecor can be used. New entries are usually added based on support requests.
Table of contents
- How to find the next update date for my data file?
- How do I use earlier/later version of Lite data file?
Enterprise and Premium data files contain the date when the next data update will be released. This information can be accessed via the NextUpdate of the DataSet object.
public partial class _Default : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
Provider p = WebProvider.ActiveProvider;
//l1 is the asp:label html element.
l1.Text = p.DataSet.NextUpdate.ToString();
Lite data file is built in to the detector and new versions are usually distributed with detector updates. If you wish to use an earlier or later version of the Lite data file for whatever reason, all you need to do is specify path to the data file in the detection section of 51Degrees.config as follows:
<detection enabled="true" autoUpdate="true" binaryFilePath="~/App_Data/51Degrees-Lite.dat" />