I have code lines like this
public double bl = 0;
browser1.EvaluateScriptAsync("document.querySelector('.amount').value=('#<%= bl%>');");
the class with
.amount
gets updated with
#<%= bl%>
but when I put
"1"
instead of
'#<%= bl%>'
the field gets updated with
1
Now, how do I pass the value of the C# variable into the javascript code?
See Question&Answers more detail:os