Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我觉得这很愚蠢,但到底是什么......
这是处理下拉列表事件的方法的两行:
resolve = (Button)FormView1.FindControl("btn_resolve"); resolve.Visible = true;
它以前和我一起工作过!现在不工作
您需要使用 formview 数据绑定事件,例如
protected void FormView1_DataBound(object sender, EventArgs e) { if (FormView1.CurrentMode == FormViewMode.Edit) { btn_resolve = (Button)FormView1.FindControl("btn_resolve"); resolve.Visible = true; } }