Hi,
I have a basic search function that retrives information from a database based on information that is supplied in one or two supplied textboxes. The information that i get back is being put into a asp:table using TableRow.Cells.Add(TableCell) method.
Like I said this is pretty basic, and is working fine.
I want to expand this by letting the users click a LinkButton, corresponding to a certain record returned, to delete this record.
I thought that I'd be able to dynamically add the linkbutton by adding a LinkButton to a TableCell and then adding this TableCell to the TableRow as I've done with all the information out of the database.
Now the link buttons are all being generated, but I can't seem to get them wired up, using a LinkButton.Command += etc... or LinkButton.Click += etc...
In the function I've created to handle the Click event it's been set to just set the text of a label, and it seems that this function just isnt being called.
I've read somewhere that this might be something to do with the web control life cycle, but this didn't really help me.
I'm aware that I could just put the info into a datagird with a delete column, this has just been annoying me today.
Any suggestions are much appreciated.
cheers,
foz
I have a basic search function that retrives information from a database based on information that is supplied in one or two supplied textboxes. The information that i get back is being put into a asp:table using TableRow.Cells.Add(TableCell) method.
Like I said this is pretty basic, and is working fine.
I want to expand this by letting the users click a LinkButton, corresponding to a certain record returned, to delete this record.
I thought that I'd be able to dynamically add the linkbutton by adding a LinkButton to a TableCell and then adding this TableCell to the TableRow as I've done with all the information out of the database.
Now the link buttons are all being generated, but I can't seem to get them wired up, using a LinkButton.Command += etc... or LinkButton.Click += etc...
In the function I've created to handle the Click event it's been set to just set the text of a label, and it seems that this function just isnt being called.
I've read somewhere that this might be something to do with the web control life cycle, but this didn't really help me.
I'm aware that I could just put the info into a datagird with a delete column, this has just been annoying me today.
Any suggestions are much appreciated.
cheers,
foz