I search how to get the device name of the material connected to the serial port.
I\'ve two different types of material that can connect on it.
First one : a
Class1 UD = new Class1();
{
string strUserAgent = Request.UserAgent.ToLower();
if (strUserAgent != null)
{
string Browser = Request.Browser.Browser;
string a = Request.Browser.MobileDeviceManufacturer;
string b = Request.Browser.MobileDeviceModel;
string c = Request.Browser.Platform;
string d = Request.Browser.Type;
string e = Request.Browser.Version;
UD.Browser = Browser;
UD.MobileDeviceModel = b;
UD.MobileDeviceManufacturer = a;
UD.Platform2 = c;
UD.Type = d;
UD.Version2 = e;
if (Request.Browser.IsMobileDevice == true || strUserAgent.Contains("iphone") ||
strUserAgent.Contains("blackberry") || strUserAgent.Contains("mobile") ||
strUserAgent.Contains("windows ce") || strUserAgent.Contains("opera mini") ||
strUserAgent.Contains("palm"))
{
UD.deviceType = "Request from Mobile Device";
}
else
{
UD.deviceType = "Request from Computer";
}
}
}