This is a migrated thread and some comments may be shown as answers.

end user manual missing "insert form"

1 Answer 26 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Staffan Averman
Top achievements
Rank 1
Staffan Averman asked on 29 Oct 2008, 09:03 AM
Is there someone who can explain how the insert form works? What do i need to do in order to let a user enter a message and send it to an email adress. I get a page error when i´m trying to use the function.

Why dosent the end user manual have a section for this?

Thankful for all the help i can get!

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 31 Oct 2008, 08:38 AM
Hi Staffan,

The editor is not the tool you need for this and the requested feature is not supported out-of-the box by our control.

Generally, RadEditor is used for editing and creating HTML content and you can think of the editor as an advanced TextBox control. The editor control allows you to insert form html fields and to specify an action for a form (see the attached screenshot) and this is all the editor is supposed to do. If you would like to use the editor's content in another page, in a new user control or in a new web form, you should use your custom logic to do so as this is outside the editor's domain. You should use some IDE such as Visual Studio and write server code and create pages.

You can find more information about the Forms here: Form Action, Forms, Action attribute.

RadEditor is responsible only for setting the Form elements and attributes but is not responsible for processing them.

If you want to you RadEditor as an e-mail editor, you can use the following code that provides properties and methods for constructing an e-mail message, e.g.

imports System.Web.Mail
...

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim myMail As New MailMessage
    myMail.From = from@microsoft.com
    myMail.To = to@microsoft.com
    myMail.Subject = "UtilMailMessage001"
    myMail.Priority = MailPriority.Low
    myMail.BodyFormat = MailFormat.Html
    'Obtain and set the HTML content of RadEditor to Mail Body property
    myMail.Body = RadEditor1.Content

    Dim myAttachment As New MailAttachment("c:\attach\attach1.txt", MailEncoding.Base64)
    myMail.Attachments.Add(myAttachment)
    SmtpMail.SmtpServer = "MyMailServer"
    SmtpMail.Send(myMail)
End Sub

Kind regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Staffan Averman
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or