rofl.
return true;
rofl.
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;
I have seen something like that. A big problem if it's in a high security thing.
return true;
One developer at work like to do things the hard way.
protected void ProcessDropDown(DropDownList myCombo, string myValue)
{
foreach (ListItem myItem in myCombo.Items)
{
if (myItem.Value == myValue)
{
myItem.Selected = true;
break;
}
}
}
All this just to select an item on aspx pages, should i throw him by the window? And yes, this method is used only on the .cs file. So why use protected and do this thing? My eyes still hurt.
return true;