mardi 19 janvier 2016

ASP.NET creating duplicate ctl Ids on hyperlink click (VB)

I created a repeater that contains a checkbox called "compare". There is a load "button" (actually asp:Hyperlink) on the page that, when clicked, gets the next ten items to be compared and displays them.

However, when this happens, asp creates duplicate Ids. For example, it will create another instance of ctl01_compare each time the load button is clicked.

This presents issues, since every time a checkbox is clicked, it runs code for each checkbox on the page that has a duplicate id.

How can I get around this?




Aucun commentaire:

Enregistrer un commentaire