asp.net core mvc – Open Specific Tab on Boostrap5 tabs pills – jsscript help needed

I cannot figure out the jscript part to show active the tab and its content based on a variable. Code will be in asp.net core MVC. The view will receive a variable to show which tab should be shown and active. Here is a simplified version of the code I would like to use: (ie: … Read more