Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

163
Visualizações
How to Handle PartialView form post in Bootstrap tab panel?

I have bootstrap tabs with 5 tabs. each tabs contains Partial View. when I post the form in Partial View from any tab then I want to stay on same tab after form submit successfully or if model validation fires. Currently, if I post form in Partial view then it loads full view and display first tab partial view

Tabpenl.cshtml

<div class="container">
    <div class="row">
       <div class="col-xl-12">
           <h3> 
           First tab
           </h3>
         <section>
            @Html.Partial("_Example1")
         </section>
         
          <h3> 
           Second tab
           </h3>
         <section>
            @Html.Partial("_Example2")
         </section>
         
          <h3> 
           Third tab
           </h3>
         <section>
            @Html.Partial("_Example3")
         </section>
         
          <h3> 
           Fourth tab
           </h3>
         <section>
            @Html.Partial("_Example4")
         </section>
         
          <h3> 
           Firth tab
           </h3>
         <section>
            @Html.Partial("_Example5")
         </section>
         
       </div>
    </div>
</div>

_Example2.cshtml

<div class="form-group">
    <div class="form-row">
       <div class="col-md-8">
            <input type="text" asp-for="City" class="form-control" maxlength="50" placeholder="Add City Name" required>
       </div>      
       <div class="col-md-4">
              <button id="btnSubmit" class="btn btn-warning btn-rounded btn-block " data-ftrans="slide" type="submit" style="height:50px; font-size:20px;">Submit</button>
       </div>
    </div>
</div>

about 4 years ago · Santiago Gelvez
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda