0
protected void btnSearch_Click(object sender, EventArgs e)
{
if (ddlSearch.SelectedIndex == 0)
{
if (ddlCol.SelectedIndex == 0)
{
ViewState["search"] = "";
}
else
{
ViewState["search"] = " and " + ddlCol.SelectedValue.ToString() + "like '%"+txtVal.Text.Replace("'", "''") + "%'";
}
lblTotalRecord.Text = objdl.GetScalerValue("select count(Client_id)from O_RechargeHistory_Retailer rh where client_id=" + Session["Re_id"].ToString() + "and balance>0 and Scode='PP'" + ViewState["search"] + "");
BindData();
要獲得totalrecord其產生錯誤在asp頁面過濾器無法正常工作?
「對象引用不設置到對象的實例」
看起來像你的ddlCol已經沒有價值 – Developerzzz
哪條線拋出異常? – Alexander
dubuge你的代碼的下拉沒有任何價值,我認爲 – Developerzzz