Re: getting the content of Editor1.Text; blank

  •  04-27-2010, 12:30 AM

    Re: getting the content of Editor1.Text; blank

    <script type="text/javascript">
          
           function getHTML()
    {
      
        var editor1 = document.getElementById('<%=Editor1.ClientID%>');
        document.getElementById("txtmatter").value = editor1.getHTML();
         alert(document.getElementById("txtmatter").value)

        </script>


    <script runat="server">
      
       
        Protected Sub btnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSend.Click
            Try
           
                If txtSubject.Text = "" Then
                    lblmsg.Visible = True
                    lblmsg.Text = "Subject Cannot be blank"
                    btnSend.Enabled = False

                    Exit Sub
                End If
                btnSend.Enabled = True
                frmemail =frmemail
                subject = txtSubject.Text

    dim matter= txtmatter.value
                cc = ""
                bcc = ""
                msg = ""
                msg = msg + Editor1.Text    -------------------------- i get this blank
                msg = msg + "<br/><br/><br/><br/>"
                msg = msg + lbldis.Text

    ............. coding for mail sending

     Catch ex As Exception
       
            Finally

            End Try
        End Sub

    i even tried with  javascripting to assign the editor value to hidden textbox
    i get the contents in the alert but i get the varibale matter =""

    i need to contents of teh ediotor on the server side so that the matter cam be emailed

View Complete Thread