0

Is it possible to open an html page from silverlight web application in chrome/firefox ?

Issue is I have 3 broswers installed on my windows pc. 1.IE 2.Chrome 3.Firefox

I would like to open the html page from silverlight web application in Chrome and not in IE.

I am using following code to open the page.

HtmlPage.Window.Navigate(new Uri("Google.com")); // Opens in IE. But I want it to open in Chrome.

Thanks.

HP1988
  • 1
  • 2
  • 1
    why now set chrome as your default browser..? – MethodMan Sep 18 '14 at 18:13
  • You can also then for debugging (as VS does not like to attach automatically to other browsers) attach to the process running in chrome/firefox and debug normally then – Nyra Sep 18 '14 at 18:18
  • @DJKraze It is on the client computer and I cannot ask him to set the default browser. – HP1988 Sep 18 '14 at 19:05
  • @alykins I can do that but finally I need to open this page programmatically in chrome so that it works on the user computer as well. – HP1988 Sep 18 '14 at 19:06
  • then why not have him open the url in Chrome is he that lazy – MethodMan Sep 18 '14 at 19:06
  • @DJKRAZE yes.I can not ask him to open it in chrome. Same reaction when I got this issue item assigned(Seriously you cannot open this in chorme). – HP1988 Sep 18 '14 at 19:10
  • anything is possible something just take more time to figure out.. we have the same issue here but our IT Director tells them to just deal with it..I would look at `kishore V.M` # 2 suggestion have you checked that out at least..? – MethodMan Sep 18 '14 at 19:13
  • do a google search I did and this is what I found good luck http://forums.asp.net/t/1946206.aspx?How+to+change+default+homepage+of+IE+Firefox+Chrome+and+Opera+programitically+using+C+application+ – MethodMan Sep 18 '14 at 19:20

2 Answers2

0

I think you can try this approach ..

  1. From silverlight start the process ( the browser you want to open .. here the challenge would be you need to the path where browser is installed. )
  2. Mostly all browsers support command line arguments ( url is one of them )

you may need to combine these both to achieve your requirement.

for step one as example how to start a process you can refer this link #1

for step 2 you can refer this link #2 example mozilla

Community
  • 1
  • 1
kishore V M
  • 818
  • 6
  • 13
0

Use below code to open .html page from silverlight application.

HtmlPage.Window.Navigate(new Uri(Application URL + "../index.html"), "_blank");