Hi there,
Is it possible to display the label same as the input format?
The example, user key in TextBox (Textmode = multiline)
Message
New Line Message
New Line Message
After user submit, the message will be saved and display the result. Below is my code to display the result
string sqlQuery = "SELECT message FROM message where id = 1";
SqlConnection conn = new SqlConnection(connectionString());
SqlCommand cmd = new SqlCommand (sqlQuery, conn);
conn.Open();
SqlDataReader rdr = cmd.ExecuteReader();
if(rdr.Read()){
lblMessage.Text = rdr["message"].ToString();
}
rdr.Close();
conn.Close();
So the result in the page is something like below:
Message New Line Message New Line Message
Is it possible to display the output such as below without user key in the html code like <br>?
Message
New Line Message
...
Go to the complete details ...