I'm trying to use the following loop to loop through dynamically created controls on my web form:
for(x = 0; x <= count; x++) {
Stmt += $("#DDLColumns" + x).val();
switch($("#DDLConditional" + x).val()) {
case "is equal": Stmt += " = ";
break;
case "begins with": Stmt += " LIKE '%";
break;
};
Stmt += $("#WhereText" + x).val();
Stmt += ", ";
}
and this is producing undefined and nulls as output from the val() functions. What am I doing wrong here?