[thelist] ASP.NET Adding a linkbutton programmatically

Casey Crookston caseyc at IntelliSoftmn.com
Mon Aug 7 14:15:33 CDT 2006


Ok, moving right along with this phonebook.... Now that we have the data
imported correctly into the database, one of the search options is to
display the alphabet from A to Z.  When the user clicks on a letter, it
will display all the categories that begin with the selected letter.

 

For i = 65 To 90

Dim lbAlpha As LinkButton = New LinkButton

lbAlpha.Text = "&#" & i & "; "

lbAlpha.CssClass = "alpha_link"

lbAlpha.Onclick = [function name]  <- error here

plhAlpha.Controls.Add(lbAlpha)

Next

 

Why is it that I can't assign an onclick event when creating a link
button programmatically?  

 

Thanks,

 

Casey




More information about the thelist mailing list