Problem?
-
Why use repeaters/datalists/grids when you can do it via a foreach loop and throw the whole string on a div.innerHTML? :doh: The item template never changes, and the guy keep doing it via code. :(( Am i unlucky? Look.
/*
some code done here....
database select, some ifs...
*/
string html = "";
int cnt = 1;
foreach (DataRow reg in Data.Rows)
{
if (cnt > 3)
{
html+= "";
cnt = 1;
}html += "";
cnt++;
}
html += "" +
"" +
" " +
" " +
" " +
"" +
@" [ + ")](javascript: void(0))
" +
@" [" + reg["some reg"] + "](javascript: void(0))" +
"" +
"";
divHtml.InnerHtml = html;
That's my bro, there's an classic asp tag to use in asp.net? Maybe he needs it. It's a ascx with 150 lines. 100 lines on this method. Also StringBuilder() and String.Format() seems to be useless. Now imagine out how to update this layout;
return true;
-
Why use repeaters/datalists/grids when you can do it via a foreach loop and throw the whole string on a div.innerHTML? :doh: The item template never changes, and the guy keep doing it via code. :(( Am i unlucky? Look.
/*
some code done here....
database select, some ifs...
*/
string html = "";
int cnt = 1;
foreach (DataRow reg in Data.Rows)
{
if (cnt > 3)
{
html+= "";
cnt = 1;
}html += "";
cnt++;
}
html += "" +
"" +
" " +
" " +
" " +
"" +
@" [ + ")](javascript: void(0))
" +
@" [" + reg["some reg"] + "](javascript: void(0))" +
"" +
"";
divHtml.InnerHtml = html;
That's my bro, there's an classic asp tag to use in asp.net? Maybe he needs it. It's a ascx with 150 lines. 100 lines on this method. Also StringBuilder() and String.Format() seems to be useless. Now imagine out how to update this layout;
return true;