Hi, I have an IE add-on which which is created in windows form through c#. I am calling an iframe in this add-on. Now I want to pass the current URL and title of IE to this iframe through postmessage(value of label1.Text and label2.Text) , I did the following code but it not passing URL :
private void Login_Load(object sender, EventArgs e)
{
foreach (InternetExplorer ie in new ShellWindows())
{
label1.Text = ie.LocationURL.ToString();
label2.Text = ie.LocationName.ToString();
}
string _embeddedpage = @"
<!doctype html>
<html>
<head></head>
<body>
<iframe width='100%' height='420' src='http://dev.livestuff.com/BrowserAddon?previewmode=Y' frameborder='0'></iframe>
</body>
</html>";
webBrowser1.DocumentText = _embeddedpage;
}
[DllImport("user32.dll", SetLastError = true)]
static extern bool PostMessage(HandleRef hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
Please suggest any code for Posmessage.
Thanks