Issue with assignment to a variable?

Aug 26, 2011 at 8:06 AM

Hi guys,

I am using Jint in an application that needs to communicate back and forth between C# and JavaScript, I am generating JavaScript that looks similar to the below:

var ManagerEmail = GetManagerEmail.Execute();   //This will call a c# function which calls a WebService and returns an email address

Mailer.SendMail('to@test.com', ManagerEmail, 'Subject in here', 'Body in here', 'from@test.com', 'cc@test.com');  //This needs to then use the above email address when calling a c# function to send an email to the correct address

My issue is that ManagerEmail is coming back into c# as null even though the .Execute() is returning the email address correctly when tested independently.

Any thoughts or ideas would be much appreciated, I am trying to avoid parsing the JavaScript with the correct value.

Thanks!