Hi
I have below code but it is opening in different browser. I want that first video should get dispplayed then second and so on in same browser.
C#
for (int i = 0; i <= 10; i++)
{
RunVideo("htps://youtu.be/f7V5lvy5-EU?loop=1");
}
public static void RunVideo(string videolink)
{
Process process = new Process();
var _process = new ProcessStartInfo(@"C:\Program Files\Google\Chrome\Application\chrome.exe", videolink);
}Thanks

Uttam KumarRank #1,076 · 1.8K reputationPosted Jan 4, 2023, 11:49 AM EST
To use the Process class, you need to declare the System.Diagnostics namespace. Make sure, you have used it.
Process.Start(@"exe_path", videolink);Sachin SinghRank #66 · 26.2K reputationPosted Jan 4, 2023, 1:59 AM EST
test this
public static void RunVideo(string videolink) { Process.Start(@"%AppData%\..\Local\Google\Chrome\Application\chrome.exe", videolink); }Rajesh GamiRank #30 · 41.5K reputationPosted Jan 4, 2023, 1:54 AM EST
WebBrowser youtubePlayer = new WebBrowser(); this.Controls.Add(youtubePlayer); youtubePlayer.Navigate("htps://youtu.be/f7V5lvy5-EU?loop=1");Ramco RamcoRank #462 · 5.4K reputationPosted Jan 4, 2023, 3:46 AM EST
Hi Sachin
I have below code but error is coming Process does not exist in current context. I am doing in web application c#
protected void Page_Load(object sender, EventArgs e) { for (int i = 0; i <= 10; i++) { RunVideo("https://youtu.be/f7V5lvy5-EU?loop=1"); } } public static void RunVideo(string videolink) { Process.Start(@"%AppData%\..\Local\Google\Chrome\Application\chrome.exe", videolink); }Thanks