foreach (DataRow item in dt.Rows) { // while (dr1.Read()) foreach (string s in List) { // var arr = s; if (s != "S-1") { if (s == item["locationNo"]) { st.Append("<td style="\"" mode="hold" /> st.Append("<td style="\"" mode="hold" /> st.Append("<td style="\"" mode="hold" /> } else { st.Append(""); st.Append("<tr>"); st.Append("<td style="\"" mode="hold" /> st.Append("<td style="\"" mode="hold" /> st.Append("<td style="\"" mode="hold" /> } } } st.Append("</tr>"); } } dr.Close(); st.Append(""); Literal1.Text = st.ToString();
if (s == item["locationNo"])
if (!DBNull.Value.Equals(item["locationNo"]) && s == (string)item["locationNo"])
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)