开发者

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

I wanna to pass query in a dynamic link button. I can add it dynamically but unable to pass query on that. Apart from that LinkButton_onClick handler is not working.

Pls tell me how to proe开发者_高级运维ed?


Have you assigned the event to the button?

LinkButton myNewButton = new LinkButton();
myNewButton.Text = "Click me!";
myNewButton.Click += new EventHandler(this.myNewButton_Click);

protected void myNewButton_Click() {
    //do stuff here
}

If you've already done this, chances are you're creating the control in the wrong Page Event.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜