How to overcome in this situation issue

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

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?

or

how to create new partial view and included this

Mark as Answer if its helpful to you

Kumaraspcode2009@gmail.com



Responses

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

Up
0
Down
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.

@html.partial("partivalviewname")

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