Better String Control In ASP.NET (WebProNews)

Better String Control In ASP.NET (WebProNews)
Whenever I had to add a string to a web controls control collection I’ve always used the Literal control like this: Literal str = new Literal(); str.Text = “hello world”; Page.Controls.Add(str); I have always thought a Literal was too cumbersome to use for a simple thing like adding a string to a controls control collection. Then, the other day, I found the LiteralControl while browsing

No comments yet. Be the first.

Leave a reply