In my Project, i am using a web browser control. I also able to handle new window in same browser control using the help from follow so answer:
SO Answer To Open New Window In Same Webbrowser Control
But the issue i am facing is, if i submit a form that open in new window that don't work.
I have noticed that SHDocVw Newwindow event has PostData (as Object) parameter but webbrowser control need PostData as bytearray.
SHDocVw Newwindow event parameters:
(URL As String, Flags As Integer, TargetFrameName As String, ByRef PostData As Object, Headers As String, ByRef Processed As Boolean)
Webbrowser control navigate parameters:
(string source, string targetFrameName, byte[] postData, string additionalHeaders);
As Asked Here is My Code: (But as it is same as the mentioned SO answer, I don't think it would be any help)
Private Sub Web_V1_NewWindow(URL As String, Flags As Integer, TargetFrameName As String, ByRef PostData As Object, Headers As String, ByRef Processed As Boolean) Handles Web_V1.NewWindow
Processed = True
webMain.Navigate(URL)
End Sub
So, my question is how can i convert that postdata object to bytearray so that webbrowser control can handle the submitted form/data correctly?