none
how to store and pass XHTML RRS feed

  • Question

  • Hi,

    I am using this to get a support ticket details:

    public void add_support_ticket(string support_incident_title, string email_address, string support_ticket_description)

    The support_ticket_description is actually coming from RichTextEditor as XHTML and it will store into a text database type like this:

    support_sql_command.Parameters.Add("param_support_ticket_description", MySqlDbType.Text).Value = support_ticket_description;

    is it correct to use it like this:

    string support_ticket_description

    or there is a better type?


    • Edited by Jassim Rahma Saturday, November 24, 2012 5:45 PM
    Saturday, November 24, 2012 5:44 PM

Answers

  • Hi Jassim,

    Because you will store it in a database as text, the string type is OK. And the xhtml string is also text string. In all, in my opinion, type string is enough.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, November 26, 2012 11:10 AM
    Moderator

All replies

  • XHTML may contain binary/control characters.  When dealing with binary you should use byte[] and use encoding UTF8.  The RichTextEditor may contain unicode character and then the encoding should be UNICODE.

    jdweng

    Saturday, November 24, 2012 9:27 PM
  • Hi Jassim,

    Because you will store it in a database as text, the string type is OK. And the xhtml string is also text string. In all, in my opinion, type string is enough.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, November 26, 2012 11:10 AM
    Moderator