I have developed a Windows Application which embeds "WebBrowser" Control. by default i have loaded one aspx page (which contains one server side button) into the browser. I want to invoke a Click method of this button (not manually) and pass arguments to the button click event. I have used the below code to pass arguments:
HtmlDocument doc = webBrowser1.Document;
HtmlElement btnTemp = doc.GetElementById("btnSubmit");
Object[] args = { "data1", "data2" };
btnTemp.InvokeMember("Click", args);
but i was not able to get these values in my aspx page.
i have also tried the below code:
Object[] args = { "data1", "data2" };
doc.InvokeScript("__doPostBack('btnSubmit', ...
Go to the complete details ...