Have you tried debugging your code to see if it hits the
event? Looking at your code, based on this line:
<asp:LinkButton ID="lnkAdd" runat="server" Text="Add Sorting" Font-Underline="true" OnClick="lnkAddOrder_Click" Font-Names="Calibri" Font-Size="10pt" ForeColor="Black" />
You wired-up an
event to your
which is named "
" but your code behind uses the name "
". You should change the event name to match with the event handler you set in your markup/HTML. So you should have something like this instead:
protected void lnkAddOrder_Click(object sender, EventArgs e)
You can also refer this example on how to
]create dynamic controls in ASP.NET WebForms: