Getting Internet Explorer Version using C#
Let's have a look over below mentioned code to get the Internet Explorer's version in c#.
public partial class mywebpage : System.Web.UI.UserControl
{
private float gettingInternetExplorerVersion()
{
// Will the version of IE or a -1 indicating the use of another browser.
float rva = -1;
System.Web.HttpBrowserCapabilities browser = Request.Browser;
if (browser.Browser == "IE")
rva = (float)(browser.MajorVersion + browser.MinorVersion);
return rva;
}
protected void Page_Load(object sender, EventArgs e)
{
double ver = gettingInternetExplorerVersion();
Label1.Text = ver;
}
}
so this is the way to get the Internet Explorer version in C#
Labels: asp.net
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment