Home

Unable to use TagBuilder

edited October 2012
Hi,

I get this message "The type or namespace name 'TagBuilder' could not be found (press F4 to add a using directive or assembly reference)" but I have added MVC assembly and its namespace. What's wrong ?

void Main() { var spanTag = new TagBuilder("span"); spanTag.SetInnerText("Texte à l'intérieur de la balise span"); string resultSpan = spanTag.ToString(TagRenderMode.Normal) + Environment.NewLine; spanTag.Dump(); }

Sam

Comments

Sign In or Register to comment.