Sometimes we require to pass parameter value from main view to controller and on depend of parameter controller load different data in to the partial view. Suppose, I create a partial view for Year Control and on year type is different i.e. if year type is 1 then year range will be April to March, if year type is 2 then year range will be January to December. For doing these, we write the below code in parent view: Here GetFinyearData is the Action Name and Emporg is the Controller Name. Then create the partial view: Below is the Controller code: Here GetFinyearMonth return the list with Month Name as per finyear type.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: