Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Update Partial view using AJAX

$
0
0

Hello,

I have a controller name "Students", and there is a main view for this controller named > "Index", in the Views folder of this controller "Students" there is sub folder "PartialViews", and it has 3 Partial Views.. so the tree will be as below

  • Controllers
    • Students
  • Views
    • Students
      • PartialViews
        • _StudentInformation
        • _StudentAddresses
        • _StudentMarks
      • Index

and in the Index view as below

<div class="step active" data-step-title="page" data-step="1" style="display:none" id="content1">
                    @{Html.RenderPartial("PartialViews/_StudentsInformation", Model); }</div><div class="step" data-step-title="page" data-step="2" style="display:none" id="content2">
                    @{Html.RenderPartial("PartialViews/_StudentsAddresses", Model); }</div><div class="step" data-step-title="page" data-step="3" style="display:none" id="content3">
                    @{Html.RenderPartial("PartialViews/_StudentsMarks", Model); }</div></div>

In ActionResult Index in Student Controller, I don't want to fill all field and information in ViewModel, I want once user move from step 1 to step2 then call ajax to refresh the PartialView with ViewModel has it own information.

Thanks.


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>