L
Lloyd Dupont
I try to create a switch control, but I'm hitting a problem, changing the
switch value with button in the page (below failig test code).
I know in this test case I could create an extra variable and use it, my
problem is the switch, i my real problem is in a repeater, hence I cannot
use a property!
how to change the label of the galador:Switch?
-----------------------------
<script runat="server">
void OnSwapSwitch(object sender, EventArgs e)
{
switch (mySwitch.Value)
{
case "0":
mySwitch.Value = "1";
break;
default:
mySwitch.Value = "0";
break;
}
}
</script>
<galador:Switch id=mySwitch runat=server Value=1 >
<galador:SwitchCase runat=server label=0>
Azerty
<asp:LinkButton ID="LinkButton1" Runat=server
OnClick=OnSwapSwitch >Clic
Clac</asp:LinkButton>
</galador:SwitchCase>
<galador:SwitchCase runat=server label=1>
Qwerty
<asp:LinkButton ID="LinkButton2" Runat=server
OnClick=OnSwapSwitch >Kodak</asp:LinkButton>
</galador:SwitchCase>
</galador:Switch>
switch value with button in the page (below failig test code).
I know in this test case I could create an extra variable and use it, my
problem is the switch, i my real problem is in a repeater, hence I cannot
use a property!
how to change the label of the galador:Switch?
-----------------------------
<script runat="server">
void OnSwapSwitch(object sender, EventArgs e)
{
switch (mySwitch.Value)
{
case "0":
mySwitch.Value = "1";
break;
default:
mySwitch.Value = "0";
break;
}
}
</script>
<galador:Switch id=mySwitch runat=server Value=1 >
<galador:SwitchCase runat=server label=0>
Azerty
<asp:LinkButton ID="LinkButton1" Runat=server
OnClick=OnSwapSwitch >Clic
Clac</asp:LinkButton>
</galador:SwitchCase>
<galador:SwitchCase runat=server label=1>
Qwerty
<asp:LinkButton ID="LinkButton2" Runat=server
OnClick=OnSwapSwitch >Kodak</asp:LinkButton>
</galador:SwitchCase>
</galador:Switch>