Okay so given a LinkButton
inside a the ItemTemplate
of a Repeater
declared like this -
<asp:LinkButton ID="restrictionDelete" runat="server" CssClass="restrictionDelete" Text="Delete..."
OnCommand="lnkDeleteRestriction_Command" CommandName="Delete" CommandArgument="<%# Container.DataItem %>"></asp:LinkButton>
Now,..the repeater is being bound to a list of Restriction
objects so when the lnkDeleteRestriction_Command
is fired I'm expecting that I can cast the CommandEventArgs.CommandArgument
which is an object
to my Restriction
type. This doesn't seem to be so,..I just get the fully qualified type name as a string.
Can I receive a typed command argument at all and if not, why is it an object?
Thanks in advance,