Hey there guys,
so basically I have a TemplateColumn that looks like this:
<asp:TemplateColumn>
<ItemTemplate>
<asp:CheckBox ID="WL" OnCheckedChanged="Check_Clicked" Runat="server" AutoPostBack="True"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateColumn>
in the code behind I have the method Check_Clicked that looks like this:
public void Check_Clicked(object sender, System.EventArgs e)
{
CheckBox cb=(CheckBox)sender;
if (cb.Checked)
{
WinLose="Win";
}
else
{
WinLose="Lose";
}
}
and now the problem, nothing happens when the event is fired..
WinLose always stays the same..
I used some breakpoints to check what happens, everything goes well until it reaches the lines WinLose="Win"; or WinLose="Lose"; and then nothing happens..simply wont put new the new value..
So my question is WHY? and how do I make it change??
Thanks.
P.S
I've tried different combinations, boolean instead of string
cb.Checked==true instead of just cb.Cheked, nothing works..
oh and I'm using VS2003 ASP.NET 1.1
so basically I have a TemplateColumn that looks like this:
<asp:TemplateColumn>
<ItemTemplate>
<asp:CheckBox ID="WL" OnCheckedChanged="Check_Clicked" Runat="server" AutoPostBack="True"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateColumn>
in the code behind I have the method Check_Clicked that looks like this:
public void Check_Clicked(object sender, System.EventArgs e)
{
CheckBox cb=(CheckBox)sender;
if (cb.Checked)
{
WinLose="Win";
}
else
{
WinLose="Lose";
}
}
and now the problem, nothing happens when the event is fired..
WinLose always stays the same..
I used some breakpoints to check what happens, everything goes well until it reaches the lines WinLose="Win"; or WinLose="Lose"; and then nothing happens..simply wont put new the new value..
So my question is WHY? and how do I make it change??
Thanks.
P.S
I've tried different combinations, boolean instead of string
cb.Checked==true instead of just cb.Cheked, nothing works..
oh and I'm using VS2003 ASP.NET 1.1