[thelist] ASP.NET Adding a linkbutton programmatically

Tab Alleman talleman at Lumpsum.com
Mon Aug 7 14:37:01 CDT 2006


Are you trying to add a client-side event handler?   If so, you should be able to add it to lbAlpha's "Attributes" collection.

> -----Original Message-----
> From: thelist-bounces at lists.evolt.org
> [mailto:thelist-bounces at lists.evolt.org]On Behalf Of Casey Crookston
> Sent: Monday, August 07, 2006 3:16 PM
> To: thelist at lists.evolt.org
> Subject: [thelist] ASP.NET Adding a linkbutton programmatically
> 
> 
> 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
> 
> -- 
> 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip Harvester 
> and archives of thelist go to: http://lists.evolt.org 
> Workers of the Web, evolt ! 
> 



More information about the thelist mailing list