Link to home
Start Free TrialLog in
Avatar of bidgadget
bidgadgetFlag for United States of America

asked on

intranet site hyperlink to open url from another browser. ASP Web, visual studio 2013 vb

I am building an intranet site.  One of our onsite links needs to only open in IE Explorer.  This is not working if they open up the intranet in Chrome or Firefox because these is no way to force the hyperlink to open the page in Internet Explorer.

For example when people go to the intranet site using google chrome which is there default browser.  I want them to be able to click on a hyper link that will open the URL in internet Explorer.  Sounds easy enough but looks like in Chrome and Firefox there are restrictions

Any help would be appreciated
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

what you are trying to do is considered 'executing a program on the users computer using the following parameters'  this is forbidden. a work around is to have them download a batch file. and run it..
You can't do that - the method by which the link is opened is determined on the computer - the browser does not have permissions or access to overwrite that.

What you can do is put script on your page that detects if the browser is IE and if it is not - prevents access.
Avatar of bidgadget

ASKER

I tried to use a vb form a create a button.  Works when I run it local in visual studio but when I run live I get an error that says can not create active x component.


 Dim TheBrowser As Object = CreateObject("InternetExplorer.Application")
        TheBrowser.Visible = True
        TheBrowser.Navigate("http://mysite")
when I run live I get an error that says can not create active x component
Where are you trying to run it live?
Are you using at as a complied application or a web form?
How is this going to help you with the original question?
Well I figured I couldn't do it from a URL so I tried to add a button to the aspx page with the above code

Works perfect when I debug from within the application but when I publish it and access it from url, I hit the button and get

Server error in / application
Cannot create activex component

The line that is singled out as the cause is
Dim the browser as object = ....  From above
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial