I have a code part with List<object>
like that:
List<object> Result= new List<object>();
Some sql connection code...
SqlCommand com = new SqlCommand(@" Select TOP(10) a,b,c from table
Some sql connection code...
while (rd.Read())
{
Result.Add(new
{
a=rd[0],
b=rd[1],
c=rd[2]
});
}
rd.Close();
con.Close();
I want to add some statement for Result
value. For example
if(a == "")
a=5;
and i use List<object>
in javascript part
var listCategory = $find("ace2").get_completionList();
var count2 = listCategory .childNodes.length;
for (j =0; j < count2; j++) {
var item2 = listCategory .childNodes[j]._value;
var a= item2.a;
var b= item2.b;
var c= item2.c;
}
and i use this value in html.
How to add some statement for List<object>()
value ?