dynamic linkbutton ID's

E

eric.anderson

I am trying to add a section to my form which allows users to upload a
file to sql server and come back with the updated list of uploaded
docs. They can do this as many times(up to 100) as they want until all
the docs they want uploaded have been. Each time a doc is uploaded,
the list comes back with a dynamic linkbutton which is supposed to
remove the file if clicked. The linkbutton is created and the event is
assigned but something odd happens each time i click the remove button.
As I upload the files, when I hover over the linkbuttons created I can
see the command in the bottom left corner of my browser saying
'javascript__doPostBack('_ctl1',''). For each additional linkbutton,
the number after ctl increases by 1. However when I click the remove
linkbutton and the controls are re-created, the numbering sequence
starts at 3 or 4 or some higher number depending on how many
linkbuttons are there. Now when I click on them, they do a postback
event which seems to do nothing except reset the numbering sequence
properly. If i click the control a second time it removes the file but
again screws up the numbering sequence of the remianing control names.
I now have to click twice to get it to remove the file correctly.

I am writing in VB

I wanted to avoid entering the code here if at all possible. If you
think it will help clarify, let me know and I'll do my best to post it.
Thanks for your help.

-eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top