Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Conrad Evans   on Apr 19 In Asp.net Category.

  
Question Answered By: Ana Bradley   on Apr 19

Try doing this:


Dim LinkButton as New LinkButton()
LinkButton.Text = "Link Text"
LinkButton.ID = "LinkID"
FormName.Controls.Add(LinkButton)

AddHandler LinkButton.Click, AddressOf MyClickHandler

...
Private Sub MyClickHandler(sender as Object, e As eventArgs)
DoSomething()
End Sub

The AddHandler "wires" the MyClickHandler to the Click event, so that
when the linkbutton is clicked, MyClickHandler is called.

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on LinkButton Or get search suggestion and latest updates.


Tagged: