我在整個網站搜索了錯誤DataBinding:'System.Char'不包含名稱的屬性
我在綁定下拉列表時遇到此錯誤。
數據綁定: 'System.Char' 不包含名稱爲 「APPRAISER_ID」
這裏是我的代碼屬性:
DataSet DSEmployee = new DataSet();
DSEmployee = ws_service.GetReportingDtl(user);
ddlEmployee.DataTextField = "APPRAISER_ID";
ddlEmployee.DataValueField = "APPRAISER_ID";
ddlEmployee.DataSource = DSEmployee.Tables[0].DefaultView.ToString();
ddlEmployee.DataBind();
而且在我的web服務。
string strQ = "select employee_id,appraiser_id from kirti_pms_reporting where appraiser_id='" + varAppraiserId.ToString() + "'";
我的下拉列表中內嵌代碼是
<asp:DropDownList ID="ddlEmployee" runat="server" AutoPostBack="true" CssClass="vlu">
我錯過的是什麼?相同的代碼在另一個aspx頁面中工作正常。
您有一個SQL注入漏洞。 – SLaks 2012-01-09 13:22:58