[thelist] ASP.NET Adding a linkbutton programmatically

Casey Crookston caseyc at IntelliSoftmn.com
Mon Aug 7 15:09:18 CDT 2006


Tab and Peter,

In my first post I said that lbAlpha.OnClick returned an error, which is
not exactly true.  It's just that Visual Studio did not provide OnClick
as an option after typing "lbAlpha."

I confess I am confused by the question you both asked: Am I adding a
client-side or server-side event handler?  I was not aware that I had an
option.

But, using:

lbAlpha.Attributes.Add("OnClick", "lbAlpha_Click()")

We never seem to actually get into lbAlpha_Click to execute the code
within.  And even if, I'm unsure how to detect the value of the
linkbutton lbAlpha.

I've been googling "asp.net Linkbutton Attributes.Add" and other such
things without any luck.  I'm not asking you to do my job for me - just
a nudge in the right direction.

Thanks!

Casey




More information about the thelist mailing list