After spending a small amount of time converting a page using concatenated html like
string output = ""; output +="<ul>"; foreach(MyClass item in MyItems) { output += "<li>"+item.Name+" - "+item.SomeProperty.ToString()+"</li>"; } output+="</ul>"; literalPlaceHolder.Text=output;
to use the ListView control, I just discovered that the original developer came back and converted the page back to a concatenated html. My personal opinion is that lists and repeaters provide cleaner, more informative markup that can be edited by someone with less experience with C #, and that they are faster and use less memory. At the very least, the page should use StringBuilder instead of string. Anyone have a good argument for this? I have a feeling that this will cause a serious conflict when I bring it.
, , , , . , .
, ASP.Net , .
, StringBuilder, . , StringBuilder .
, , , , . ListView - , , .
, , . . , , , -. , , - ( , ). , .
.
. . , , html, aspx ( ascx) .
, , Repeater, html- , , , , , , .
, Html. , , .
. - . . . , , . , . , , .
Source: https://habr.com/ru/post/1724411/More articles:Working with state machines workflows in ASP.NET MVC - c #spwn-fcgi dies after several connections - phpHow to create a heat map on the market - c #How can I access an instance of a class from a raise thread? - c ++How to organize webapp? - djangoWindows Authentication Connection String Encryption - .netCompiled version of the Sqlite3 ICU extension - sqliteMoving from VB.Net to C # - c #jQuery - Syntax error - jqueryПоле SharePoint, не отображаемое в Display/Edit/New pages - sharepointAll Articles