Replies: 1 comment 2 replies
-
Depending on the c# version you can use https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated otherwise just concatenate the strings together. This really isn't anything to do with CefSharp. This isn't a generic programming support forum. Generic programming questions try stackoverflow. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Pls help me on this below issue.
I am trying develop some c# windows form application using CEF browser. In the main form, there two sections, where one for the browser window and the remaining section includes basic windows forms objects like text boxes and buttons.
I would need to fill the 'username' and 'password' fileds in the loaded web page, using the values inside two text boxes in the windows form.
I used the format <%=variable%> inside the java string, but it doesnot take the value from the c# variable.
string username = TxtUserName.Text;
CurBrowser.ExecuteScriptAsync("document.getElementsByTagName('input')[0].setAttribute('value',<%= username %>);");
Basically I need the c# variable value to be taken inside the javascript to automatically fill the username filed in the browser .
Greatly appreciate your valuable input.
Beta Was this translation helpful? Give feedback.
All reactions