I need to check browser in VB.NET
, so that I can use that in an IF - ELSE
condition.
Something like this:
IF(!IE){//do this }.
Can anyone please help?
The Request object has a browser property you could reference.
Request.Browser.Browser
Will give you the browser that you'll have to then check to see if it is IE.
You're syntax leads me to believe that this is a JavaScript or C# question. If it is JavaScript, there are plenty of libraries out there to detect browsers client side. A quick example is..
var browser = navigator.appName;
** Dim bc As HttpBrowserCapabilities = HttpContext.Current.Request.Browser**
I have used the above statement and that worked for me! As it was not finding the httpcontext I used the above statement. Thanks
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.