I am doing the following. However whenever the text in the IFRame (ifrHTML)
has any type of formatting other than plaintext, the innerHTML is not
returned.
If I do a CTRL+B (bold) or CTRL+U (Underline) or any other formatting. The
cmdSend_Click routine is not entered. That is what puzzles me.
~~~~~~~~~~~~
WEBFORM
~~~~~~~~~~~~
<HTML>
<body>
<form id=frmMain method=post runat="server">
<iframe id=ifrHTML name=ifrHTML ></iframe>
<asp:Button id=cmdSend runat="server" Text="Send"></asp:Button>
<input type=hidden name=hidValue>
</form>
<script>
//Set the IFRame to Design Mode.
ifrHTML.documen t.designMode="o n"
</script>
</body>
</HTML>
~~~~~~~~~~~~
CODE BEHIND.
~~~~~~~~~~~~
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
cmdSend.Attribu tes.Add("onClic k",
"document.frmMa in.hidValue.val ue = ifrHTML.documen t.body.innerHTM L;")
End Sub
Private Sub cmdSend_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles cmdSend.Click
Try
Dim strValue As String
strValue = Request.Form("h idValue")
Catch ex As Exception
Throw New Exception(ex.To String())
End Try
End Sub
L Anthony Johnson
"Alex Papadimoulis" <alexp-at-halogenstudios. com> wrote in message
news:uN******** *****@tk2msftng p13.phx.gbl...
This information is not sent back to the server. You would have to use
Javascript to place an IFrame's InnerHTML in an HTML Hidden Input tag and
read it that way.
Alex Papadimoulis
"L Anthony Johnson" <pp*****@nospam m4m3bellsouth.n et> wrote in message
news:uA******** ******@tk2msftn gp13.phx.gbl... Has anyone had any success doing this. I have tried, but the InnerHTML
property always comes back as an empty string.
L Anthony Johnson