I would like to generate the Link Button as below in code behind.
<asp:LinkButton ID="lnkCustomize" OnClientClick="showDialog('editPerson')" Text="Customize" CommandName="Customize" CommandArgument='<%#Eval("type") + ";" + Eval("facility") + ";" + Eval("timestamp")%>runat="server"></asp:LinkButton>
This is what I have so far but failed to retrieve value from arguements. Appreciate for any reply.
LinkButton link = new LinkButton();
link.Text = "Customize";
link.ID = "lnkCustomize";
double timestamp = ConvertToUnixTimestamp(leftstartTime1);
link.CommandArgument = Eval("type") + "," + Eval("facility") + "," + Eval("timestamp");
link.Command += new CommandEventHandler(DynamicClick);
link.OnClientClick = "showDialog('editPerson')";
1. Fixed by having proper defined format
2. Fixed by extracting all the values of arguements as below