c# - How to pass query in a dynamically created linkbutton in asp.net -


I want to pass the query in a dynamic link button. I can add it dynamically, but unable to pass the query on that linkbutton_oneclick handler is not working except.

Pls tell me how PROeed?

Did you assign events to this button?

linkbutton myNewButton = new link button (); MyNewButton.Text = "Click me!"; MyNewButton.Click + = new event handler (this.myNewButton_Click); Protected void myNewButton_Click () {// do stuff here}

If you have already done this, then it is likely that you are creating control in the wrong page event.


Comments