M
Matthew MacDonald
Hi all,
I am adding controls to a table dynamically. I have a list that I am putting into the session to keep track of them on postback. What I need to know though, is how to add the oncommand method to the buttons as I create them? For example:
btn.ID = "btnDelete" & list.Count
btn.Text = "Remove"
btn.CommandName = "RemoveSW"
btn.CommandArgument = list.Count
btn.oncommand = "Command"
list.add(btn)
Doesn't work because the oncommand method is protected.
Any thoughts?
Thanks,
Matt
I am adding controls to a table dynamically. I have a list that I am putting into the session to keep track of them on postback. What I need to know though, is how to add the oncommand method to the buttons as I create them? For example:
btn.ID = "btnDelete" & list.Count
btn.Text = "Remove"
btn.CommandName = "RemoveSW"
btn.CommandArgument = list.Count
btn.oncommand = "Command"
list.add(btn)
Doesn't work because the oncommand method is protected.
Any thoughts?
Thanks,
Matt