locked
How to return text input to HTML RRS feed

  • Question

  • User414145754 posted

    I have a web form with 3 fields - Email, Internal OOF, External OOF. CS code runs fine to stamp OOF on the mailbox. Issue is if i input OOF message as below in webform,

    Hi

    I am OOF

    Thanks!

    The OOF reply stamped is "HI I Am OOF Thanks!". It skips the enter, how to resolve this ? fields in webform are all textbox, do i have to change anything there or in the code ? An HTML output will work as OOF reply will convert it into user readable/HTML format for email.

    Thanks!

    Thursday, June 28, 2018 5:36 AM

Answers

  • User-369506445 posted

    Hi

    the only thing that will create a break is a <br /> tag. So you need to find and replace whatever is saved in the database:

    Label1.Text = someDatabaseText.Replace("\r\n", "<br />");
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 28, 2018 5:47 AM

All replies

  • User-369506445 posted

    Hi

    the only thing that will create a break is a <br /> tag. So you need to find and replace whatever is saved in the database:

    Label1.Text = someDatabaseText.Replace("\r\n", "<br />");
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 28, 2018 5:47 AM
  • User414145754 posted

    Thanks for the insight, let me give it a try.

    Thursday, June 28, 2018 6:55 AM
  • User-1171043462 posted

    You can use a MultiLine TextBox.

    1. Set ReadOnly True. So that it's Text cannot be modified
      <asp:TextBox ID = "txtMessage" runat = "server" ReadOnly = "true" TextMode = "MultiLine"/>
    Thursday, June 28, 2018 8:21 AM
  • User414145754 posted

    Readonly will not allow me to enter OOF reply.

    Thursday, June 28, 2018 7:02 PM
  • User414145754 posted

    Thank you so much vahid, it worked.

    Thursday, June 28, 2018 7:02 PM
  • User-1171043462 posted

    OOF Reply means?

    Thursday, June 28, 2018 7:29 PM
  • User414145754 posted

    Out of office reply.

    Friday, June 29, 2018 7:28 PM