How to overcome in this situation issue

Posted by Jayakumars under C# on 6/9/2017 | Points: 10 | Views : 1192 | Status : [Member] [MVP] | Replies : 1

I have in a customerlist in my Index.cshtml
so that i have using model like this

@model IEnumerable<Customers>

another one i need put datepicker control in same view
how to implemented?


how to create new partial view and included this

Mark as Answer if its helpful to you


Posted by: Qyam on: 6/9/2017 [Member] Starter | Points: 25

how to create new partial view and included this inside view

Note:--Partial view is a reusable view so we should place this inside share folder so that it can be share.

1. create share folder in your solution
2. Right-click on the "Shared" folder and select "Add" >> "View…".
3. Name the view as per your choice and select "Empty (without model)" as the template. Check "Create as a partial view" since it should be a partial view.
4.Design the page as per your choice
5.Call a partial view using Html helper in the the main view(for you index.cshtml) . Here we can also use Html.RenderPartial instead of Html.Partial.


6. Run the project and you can see the partial view is rendered in the main view.

Hope it helps.....................

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response