C# - Process.Start - Pass html code to exe as argument
- by dkirk
Hello, I am using the code below to start a executable file from a windows service and I need to pass html code (stored in a variable) as an argument. I am escaping with double quotes but this is not working. What do I need to do in order to pass this correctly? Thanks in advance for any guidance that is offered.
Inside the service:
Process.Start(@"E:\Program Files\MyApp.exe", dr["rec"].ToString() +
" \"" + subject + "\" \"" + htmlVar);
and then within MyApp.exe:
static void Main(string[] args)
{
Program MyProg = new Program();
MyProg.MyMeth(args[0].ToString(), args[1].ToString(), args[2].ToString());
}