D
Dave
I have a web page that I'm trying to toggle between current data and
archived data. So far so good. To preserver the integrity of the
archived data, I need to disable the Edit, Delete, and New links in
the Form View. The below code is what I've been trying to use, and
I've tried it in various events with no luck. I need some help.
Control btn1 = this.fvCapture.FindControl("EditButton");
Control btn2 = fvCapture.FindControl("NewButton");
Control btn3 = fvCapture.FindControl("DeleteButton");
Button b1 = btn1 as Button;
Button b2 = btn2 as Button;
Button b3 = btn3 as Button;
if (b1 != null)
{
b1.Enabled = false;
}
if (b2 != null)
{
b2.Enabled = false;
}
if (b3 != null)
{
b3.Enabled = false;
}
Thankyou
archived data. So far so good. To preserver the integrity of the
archived data, I need to disable the Edit, Delete, and New links in
the Form View. The below code is what I've been trying to use, and
I've tried it in various events with no luck. I need some help.
Control btn1 = this.fvCapture.FindControl("EditButton");
Control btn2 = fvCapture.FindControl("NewButton");
Control btn3 = fvCapture.FindControl("DeleteButton");
Button b1 = btn1 as Button;
Button b2 = btn2 as Button;
Button b3 = btn3 as Button;
if (b1 != null)
{
b1.Enabled = false;
}
if (b2 != null)
{
b2.Enabled = false;
}
if (b3 != null)
{
b3.Enabled = false;
}
Thankyou