Posted on: 9/18/2014 4:17:49 PM | Views : 477

Dear all, 
I am calling data from the database and displaying it in a label.  I am calling the fieldname 'body', which is setup as type 'nText' on the database server.  I am currently getting the output  as "<P align=justify>The list of DBS failed to find demand this afternoon with" and I would like to remove the string "<P align=justify>", from the text. 
private string getData() { string tArt; using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["######"].ConnectionString)) { string commandtext = "select dbo.FirstNWords(body,25), title, body from article"; SqlCommand command = new SqlCommand(commandtext, con); con.Open(); tArt = (string)command.ExecuteScalar(); ...

Go to the complete details ...