[thelist] ASP.NET: Passing the value of a link button
Casey Crookston
caseyc at IntelliSoftmn.com
Tue Aug 8 11:08:57 CDT 2006
Ok! I solved the darn problem of the subroutine not executing that I
was working on yesterday. Now, here's a much simpler question (I hope).
In the code below, the value of "e" in GetCategoryResults(e) is equal to
"System.EventArgs" but should be equal to "A" or "M" depending on what
letter the user clicks.
How do I modify AlphaCommand(ByVal sender As Object, ByVal e As
System.EventArgs) to capture the value of the link button clicked?
Thanks!!
Private Sub populateAlpha()
Dim i As Integer
For i = 65 To 90
Dim lbAlpha As LinkButton = New LinkButton
lbAlpha.Text = "&#" & i & "; "
lbAlpha.CssClass = "alpha_link"
lbAlpha.ID = "lbAlpha" & i
AddHandler lbAlpha.Click, New EventHandler(AddressOf
AlphaCommand)
plhAlpha.Controls.Add(lbAlpha)
Next
End Sub
Public Sub AlphaCommand(ByVal sender As Object, ByVal e As
System.EventArgs)
GetCategoryResults(e)
End Sub
More information about the thelist
mailing list