Using asp mvc, I have simple c# script in the controller that will simply open IE browser. But my aim is to execute this when the page is loaded in chrome.
Here is the controller script:
public async Task<JsonResult> Test()
{
Process.Start("IExplore.exe", "www.google.com");
using (var client = new HttpClient())
{
var link = "www.google.com";
return Json(await client.GetStringAsync(link));
}
}
And here is my unsure call to make it work:
$(document).ready(function () {
$.get("/MyController/Test", {},
function (res) {
let msg = JSON.parse(res);
console.log(msg)
});
});
If I do it in plain console project using c# only, it will work without any problem and will open the IE expectedly, I just need to transfer this feature to my web page using chrome:
Process.Start("IExplore.exe", "www.google.com");
Any suggestion/comments TIA.