Missing operand after 'Operator Name' operator

前端 未结 1 1188
无人及你
无人及你 2020-12-20 23:10

I am filtering my gridview using dataview. I am passing the filter command to dataview as mentioned below;

string strFilter= \" 0=0 \";

if (Session[\"Sample         


        
相关标签:
1条回答
  • 2020-12-20 23:40

    Your problem is that "Emp Name" (the column name) contains a space and needs to be wrapped in square brackets in the filter expression:

    strFilter= strFilter+ " and [Emp Name] = '" + Session["SampleSession"].ToString() + "' ";
    
    0 讨论(0)
提交回复
热议问题