Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to know my caller's program name?

Tags:

html

c#

I have a C# program which is launching a HTML in this way:

System.Diagnostics.Process.Start("MarketBatchLoad.html");

Can my html file know which program is launching it? For example, my C# program's name is ABC.exe, so I need to capture 'ABC.exe' in my html file. Is there a way to achieve this?

like image 720
Aaron Tan Avatar asked Nov 23 '25 20:11

Aaron Tan


1 Answers

You can try this to get file name and extension and pass in HTML :

System.AppDomain.CurrentDomain.FriendlyName will output test.exe

like image 122
Manwal Avatar answered Nov 26 '25 10:11

Manwal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!