DixieFlatline
Programmer
Hi,
I have placed a PlaceHolder on my aspx file and in one of my event handler ( a search handler ) dynamically add HyperLink, Label and Button controls dynamically to this PlaceHolder. However, I can't seem to get the event handling for the buttons to hook up properly. Right now, I generate a button for every record I have and use the record ID as the control ID with all buttons pointing to the same event handler method call addToFavorite(). In every button I set
( myButton.ID=report.ID and myButton.CommandName="addToFavorite" )
is this the same as setting OnClick="addToFavorite" ?
and if I can get the event handling to work, how should I cast the sender object so that I can get the ID back (the one I set as report.ID ).
Need help!!
Thanks,
Dix
I have placed a PlaceHolder on my aspx file and in one of my event handler ( a search handler ) dynamically add HyperLink, Label and Button controls dynamically to this PlaceHolder. However, I can't seem to get the event handling for the buttons to hook up properly. Right now, I generate a button for every record I have and use the record ID as the control ID with all buttons pointing to the same event handler method call addToFavorite(). In every button I set
( myButton.ID=report.ID and myButton.CommandName="addToFavorite" )
is this the same as setting OnClick="addToFavorite" ?
and if I can get the event handling to work, how should I cast the sender object so that I can get the ID back (the one I set as report.ID ).
Need help!!
Thanks,
Dix