I have in a razor page the following bootstrap tab layout:
<ul class="nav nav-pills nav-justified">
<li class="active"><a href="#overview" data-toggle="tab" >overview</a></li>
<li><a href="#Profil" data-toggle="tab" >Profil</a></li>
<li><a href="#bla" data-toggle="tab" >Bla</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane fade in active" id="overview">
<p>overview
</div>
<div class="tab-pane fade in active" id="Profil">
<p>Profil
</div>
<div class="tab-pane fade in active" id="bla">
<p>bla
</div>
</div>
All working fine, except: How can i call the same page with a different tab and content active?
Obviously if i do a
return RedirectToAction("Edit", "Profil");
to the same view and controller method it takes the initial html.
What could be a solution for that?
I already thought in setting a tempdata string like so:
@TempData["activatesecondtab"] = "2ndtabactive";
and would do then in my razor page:
if(@TempData["activatesecondtab"] == "2ndtabactive")
use this html
else
use that html
...but it doesn't accept the condition like this...