@Html.Partial("~/Views/Shared/_TestimonialSubmitPartial", "1")
Then, in the partial view, read it using @Model -- it's the only value passed in, so no dot notation is necessary. Each time I'm using the partial view, I change the value.
In the partial view, I set the data-target of the Bootstrap button to the concatenated ID and also set the collapse div to that same value:
<button class="btn btn-default" data-target="#testimonial-submit-instructions-@Model" data-toggle="collapse" type="button"> Submit Testimonial </button> <div class="collapse" id="testimonial-submit-instructions-@Model"> ..... </div>
No comments:
Post a Comment