Description
The anthem:Panel control isn't really much more than a fancy div.
It's mostly useful as a container for other controls (even non-Anthem controls)
which can be toggled on and off during a call back.
Example
Click the button to toggle the visibilty of the two panels.
This is Panel 1.
This panel's Visible property is initially set to true
(which is the default).
Click the button and watch it disappear. Click it again and watch it reappear.
There's another panel next to this one with its Visible property
initially set to false.
Steps
-
The anthem:Panel control works just like the asp:Panel
control except that it can be modified during a call back. Add an anthem:Panel
control to your page and set its Visible property to whatever it
needs to be:
<anthem:Panel id="panel1" runat="server" Visible="false">This panel is not initially visible.</anthem:Panel>
-
During any call back, you can toggle the value of the Visible property.
Be sure to set the UpdateAfterCallBack property to true or the
change won't be reflected in the client-side page:
<script runat="server">
void button_Click(object sender, EventArgs e)
{
panel1.Visible = !panel1.Visible;
panel2.Visible = !panel2.Visible;
}
</script>
Remarks
It's possible to use anthem:Panel controls to dynamically update
non-Anthem controls during a call back. Just put those controls inside an anthem:Panel
control.