Pardon my ignorance, I'm a .NEWBIE, making the move from classic ASP. I'm populating a datagrid with a list of brokers. I need a checkbox in column one for each broker.
Now normally, I would populate the "id" property of the checkbox control with a dynamic name based off the primary key of our brokers table. However, when I attempt this in .NET, I get the following error.
----------------------------------------------
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: 'brokers<%# DataBinder.Eval(Container.dataitem, "idnum")%>' is not a valid identifier.
Source Error:
Line 27: <asp:TemplateColumn HeaderText="Move">
Line 28: <ItemTemplate>
Line 29: <asp:CheckBox ID='brokers<%# DataBinder.Eval(Container.dataitem, "idnum")%>' Checked='true' runat="server" />
Line 30: </ItemTemplate>
Line 31: </asp:TemplateColumn>
----------------------------------------------
I can assign the same value to the "text" property of the checkbox with no problem, but not the ID. Can someone please point me in the right direction towards a better way to identify which broker checkbox(s) are submitted?
Thanks in advance,
-Justin
Now normally, I would populate the "id" property of the checkbox control with a dynamic name based off the primary key of our brokers table. However, when I attempt this in .NET, I get the following error.
----------------------------------------------
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: 'brokers<%# DataBinder.Eval(Container.dataitem, "idnum")%>' is not a valid identifier.
Source Error:
Line 27: <asp:TemplateColumn HeaderText="Move">
Line 28: <ItemTemplate>
Line 29: <asp:CheckBox ID='brokers<%# DataBinder.Eval(Container.dataitem, "idnum")%>' Checked='true' runat="server" />
Line 30: </ItemTemplate>
Line 31: </asp:TemplateColumn>
----------------------------------------------
I can assign the same value to the "text" property of the checkbox with no problem, but not the ID. Can someone please point me in the right direction towards a better way to identify which broker checkbox(s) are submitted?
Thanks in advance,
-Justin