0
I have an HTML where I’m formatting it inside a StringBuilder
, where there are "quotes" I am passing a bar, but it is not opening the correct HTML.
public string CorpoPaginaHtml()
{
StringBuilder corpoemail = new StringBuilder();
corpoemail.AppendLine("");
corpoemail.AppendLine("< !DOCTYPE html >");
corpoemail.AppendLine("< html lang = \"pt_BR\"> ");
corpoemail.AppendLine("< head > ");
corpoemail.AppendLine("< meta charset = \"utf-8\" >");
corpoemail.AppendLine("< meta http - equiv = \"X-UA-Compatible\" content = \"IE=edge\" >");
corpoemail.AppendLine("< meta name = \"viewport\" content = \"width=device-width, initial-scale=1\" >");
corpoemail.AppendLine("< title > Aviso de Produto</ title >");
corpoemail.AppendLine("< link rel = \"stylesheet\" href = \"http://netdna.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css\" > ");
corpoemail.AppendLine("< script src = \"http://imsky.github.com/holder/holder.js\" ></ script > ");
corpoemail.AppendLine("</ head >");
corpoemail.AppendLine("< body >");
corpoemail.AppendLine(" < div class=\"container\" >");
corpoemail.AppendLine("< hr />");
corpoemail.AppendLine("<h2>Aviso de Produto</h2>");
corpoemail.AppendLine("< div class=\"row\">");
corpoemail.AppendLine("<div id = \"items -list\" class=\"col-xs-8\">");
corpoemail.AppendLine("<div class=\"media\">");
corpoemail.AppendLine("<a class=\"media -left\" href=\"#\">");
corpoemail.AppendLine("<img alt = \"64x64\" width=\"150\" height=\"100\" src=\"http://media.webdevacademy.com.br/2014/02/placeholder.jpg\">");
corpoemail.AppendLine("</a>");
corpoemail.AppendLine("< div class=\"media -body\">");
corpoemail.AppendLine(" <h4 class=\"media -heading\">Titulo</h4>");
corpoemail.AppendLine(" Cras sit amet nibh libero, in gravida nulla.Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.Fusce condimentum nunc ac nisi vulputate fringilla.Donec lacinia congue felis in faucibus.");
corpoemail.AppendLine("</div>");
corpoemail.AppendLine("</div>");
corpoemail.AppendLine(" </div>");
corpoemail.AppendLine("</div>");
corpoemail.AppendLine("<hr />");
corpoemail.AppendLine("< footer class\"footer -inverse\">");
corpoemail.AppendLine(" <div class=\"container\">");
corpoemail.AppendLine("<p class=\"text -muted\">©2017 - Modelo Exemplo Onofre.</p>");
corpoemail.AppendLine(" </div>");
corpoemail.AppendLine(" </footer>");
corpoemail.AppendLine(" <script src = \"https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js\" ></ script > ");
corpoemail.AppendLine(" <script src = \"http://netdna.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js\" ></ script > ");
corpoemail.AppendLine(" </ body >");
corpoemail.AppendLine("</ html >");
return corpoemail.ToString();
}
What’s the problem? What do you mean "is not opening the correct HTML"?
– Jéf Bueno
< footer class\"footer -inverse\">"
is missing the signal=
e.g. I think Voce has to revise its HTML– andrepaulo
Why use
StringBuilder
?– Maniero
Have any answers solved what was in doubt? Do you need something else to be improved? Do you think it is possible to accept it now?
– Maniero