ASPNET CheckBox and a CheckBox in a TemplateField

J

Jason Huang

Hi,

In my ASPNET 2.0 C# Web form, what's the difference between a CheckBox and
a TemplateField's CheckBox?

<asp:CheckBox id="CheckBoxNormal" runat="server"
AutoPostBack="True" />

<asp:TemplateField HeaderText="Select">
<ItemTemplate>
<asp:CheckBox ID="tpCheckBox" runat="server" AutoPostBack="true" />
</ItemTemplate>
</asp:TemplateField>

In the Page_Load, I can have the
CheckBoxNormal.CheckedChanged += new EventHandler(this.Check_Clicked);
But it won't work in the
tpCheckBoxl.CheckedChanged += new EventHandler(this.Check_Clicked);

Thanks for help.

Jason
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top