I am at wits end trying to figure this out!!
Basically i have a GridView in a UserControl. I assign the pk of the item
bound to it via a LinkButton in a template.
All works fine until i raise an event from the usercontrol, change the data
from the calling aspx page and rebind it. By doing so, the LinkButton has
the WRONG CommandArgument - to confuse things even further i tested by adding
a button field that is bound to the same value -- the text output of this is
correct, however the CommandArgument in the linkbutton is not - how is that
even possible?
Here is the buttonField and the LinkButton, both of which get diffrent
values for pkContentPage
<asp:ButtonField CommandName="Edit" DataTextField="pkContentPage" />
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false"
CommandArgument='<%# DataBinder.Eval(Container.DataItem, "pkContentPage") %>'
CommandName="Edit" Text="Edit"
</asp:LinkButton>
Any help would be greatly appreciated