I want to create dynamic buttons on button click event(for example., btnCreateDynamic_Click).
I tried creating dynamic buttons on page_load event and Pre_int event.They are all working but i want to create them in button click event. How can i do this in c# asp.net?
I want to create dynamic buttons on button click event(for example., btnCreateDynamic_Click). I tried
Share
An idea would be to create a list of buttons in which you’d store the buttons you created in btnCreateDynamic_click.
you could have a method like:
in btnCreateDynamic_click you could have something like:
and in the pageLoad for example you could do something like
myDinamicButtonsList should be stored somewhere from where it could be retrieved after each request.
EDIT:
In page load you could have something like this:
i didn’t tested it but it should work.