Save text string in MySQL

2

Good, I am trying to save the text that the user writes in a textarea, this text I show it later something like this:

  

Instructions:

     
  • Instruction 1.
  •   
  • Instruction 2.
  •   
  • Instruction 3.
  •   

    What I do at the moment is to force the user to add a specific character where he wants the paragraph to end, so what is stored in the DB is something like this:

    1. Instruccion 1.;2. Instruccion 2.;3. Instruccion 3.
    

    This I do for later to make a split and show it like in the part above.

    var split;
    split = instrucciones.split(";");
    

    My question is whether there is a way to save the text of the textarea and that it recognizes when the user gives "enter" or if there is a way to add a special character without the user having to type it since this is a little uncomfortable . Thanks in advance.

    PD. I'm using C # .ASP, JavaScript and MySQL.

        
    asked by Francisco Fernandez 14.09.2016 в 17:07
    source

    1 answer

    2

    Use the "enter" code directly, when you do the split use Split((char)13);

    Greetings,

        
    answered by 14.09.2016 / 17:14
    source