I want to create dynamically the id's of the buttons into a list of buttons, in order to get any of the button using getElementById. 

An example of the code using the same id :

```
 @foreach (var cat in Model) {
     <div class="list-group">
         <button id="nameCategory" onclick="onClickSeeProducts()" >@cat.Name</button>
     </div>
 }

```

The function onClickSeeProducts should looks like :

```
function onClickSeeProducts() {
    button = document.getElementById("nameCategory").innerHTML;
    //Something 
}

```