I've got a block of html code that includes some form action stuff, which has the " appearing a lot.
Is there a way I can make the entire block into a string?
public string methodName()
{
开发者_开发问答 return @ " text goes here.. blah blah <p> a bit of html stuff</p>
<form action="www...." method="post">
<input type="hidden" name="cmd"
I get a lots of angry red underlining from this.
var html = @"<html>
<body>
<span id=""name""> somethnig more</span>
</body>
</html>";
Placing @ before a string means that the contents should not be parsed (\n and other control characters do not work). It also means that the string can span over multiple lines and have " in it, as long as you write "" (only one will be displayed).
精彩评论