Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

154
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!