Sign in to follow this  
DotMRT

How to check IE version in VB.NET

Recommended Posts

Hey can any1 please tell me. or give me the code, which can tell me the current version of IE that is installed on the PC?
I will pay NT$ 25
Also name of the user will be included it the credits of the app, that will feature this code :)

Share this post


Link to post
Share on other sites

This script checks whether it's up to date

<%@ Page Language="VB" %>

<script language="vb" runat="server">

 Sub Page_Load(Source As Object, E as EventArgs)

	If Not IsPostBack Then

 	If Request.Browser.Browser = "IE" Then

 	If Request.Browser.MajorVersion < 8 Then

 	MyLabel.Text = "Time to upgrade Internet Explorer!"

 	Else

 	MyLabel.Text = "Your copy of Internet Explorer is up to date."

 	End If

 	Else

 	MyLabel.Text = "You're not using Internet Explorer"

 	End If

	End If

 End Sub

</script>


<html>

 <body>

	<asp:Label id=MyLabel runat="server" Text=""/>

 </body>

</html>

Edited by -M-A-R-K-

Share this post


Link to post
Share on other sites

MARK thats ASP.NET. You have embedded Vb.net code into a asp.net file.

If hes going to use it, it will be in a windows application and remember, novahost does not serve asp files.

Share this post


Link to post
Share on other sites

Never used vb.net or asp.net but possibly something in this?
http://vbnet.mvps.org/index.html?code/internet/ieversion.htm

It's so great how use guys that don't know the answer even bother suggesting an answer, which is clearly copied from the internet. But helping is always fun.

  • Upvote 1

Share this post


Link to post
Share on other sites

hi,

I'am not sure if this is the best way but it's my own method, it's really short:

        Dim version = FileVersionInfo.GetVersionInfo("c:\windows\system32\ieframe.dll")

        MsgBox(version.ProductVersion)

  • Upvote 1

Share this post


Link to post
Share on other sites

Well i like both of the answers :)
Thats the reason y i have sent both of you NT$25 each.
-----------------------------------------
Also please reply and tell me your name.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this