Reputation: 207
I feel this is stupid, but what the hell...
this is two lines of a methods that handles a dropdownlist event:
resolve = (Button)FormView1.FindControl("btn_resolve");
resolve.Visible = true;
It used to work with me earlier! Not working now
Upvotes: 2
Views: 2257
Reputation: 52241
you need to use formview Databound event like
protected void FormView1_DataBound(object sender, EventArgs e)
{
if (FormView1.CurrentMode == FormViewMode.Edit)
{
btn_resolve = (Button)FormView1.FindControl("btn_resolve");
resolve.Visible = true;
}
}
Upvotes: 2