Show Multiple models data in one view [duplicate]
This question already has an answer here:
Multiple models in a view
10 answers
My project is based on Asp.net Mvc i have facing the issue to show multiple model data in one view but didn't show in list or grid view it should be show in Form View style
i have two modals class Product , BusinessCase
public class productViewModel
{
public string ProductTitle { get; set; }
public string Purpose { get; set; }
public string Composition { get; set; }
public string Requirment { get; set; }
}
business case viewModel
public class BcaseViewModel
{
public string ExecutiveSummary { get; set; }
public string Reason { get; set; }
public string ExpectedBenefits { get; set; }
public string DisBenefits { get; set; }
public string Cost { get; set; }
public string MajorRisks { get; set; }
}
I want to show these two view model data in one view that is
public ActionResult PBView()
{
return View();
}
html razor model-view-controller view model
marked as duplicate by user3559349 Nov 24 '18 at 7:39
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Multiple models in a view
10 answers
My project is based on Asp.net Mvc i have facing the issue to show multiple model data in one view but didn't show in list or grid view it should be show in Form View style
i have two modals class Product , BusinessCase
public class productViewModel
{
public string ProductTitle { get; set; }
public string Purpose { get; set; }
public string Composition { get; set; }
public string Requirment { get; set; }
}
business case viewModel
public class BcaseViewModel
{
public string ExecutiveSummary { get; set; }
public string Reason { get; set; }
public string ExpectedBenefits { get; set; }
public string DisBenefits { get; set; }
public string Cost { get; set; }
public string MajorRisks { get; set; }
}
I want to show these two view model data in one view that is
public ActionResult PBView()
{
return View();
}
html razor model-view-controller view model
marked as duplicate by user3559349 Nov 24 '18 at 7:39
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Multiple models in a view
10 answers
My project is based on Asp.net Mvc i have facing the issue to show multiple model data in one view but didn't show in list or grid view it should be show in Form View style
i have two modals class Product , BusinessCase
public class productViewModel
{
public string ProductTitle { get; set; }
public string Purpose { get; set; }
public string Composition { get; set; }
public string Requirment { get; set; }
}
business case viewModel
public class BcaseViewModel
{
public string ExecutiveSummary { get; set; }
public string Reason { get; set; }
public string ExpectedBenefits { get; set; }
public string DisBenefits { get; set; }
public string Cost { get; set; }
public string MajorRisks { get; set; }
}
I want to show these two view model data in one view that is
public ActionResult PBView()
{
return View();
}
html razor model-view-controller view model
This question already has an answer here:
Multiple models in a view
10 answers
My project is based on Asp.net Mvc i have facing the issue to show multiple model data in one view but didn't show in list or grid view it should be show in Form View style
i have two modals class Product , BusinessCase
public class productViewModel
{
public string ProductTitle { get; set; }
public string Purpose { get; set; }
public string Composition { get; set; }
public string Requirment { get; set; }
}
business case viewModel
public class BcaseViewModel
{
public string ExecutiveSummary { get; set; }
public string Reason { get; set; }
public string ExpectedBenefits { get; set; }
public string DisBenefits { get; set; }
public string Cost { get; set; }
public string MajorRisks { get; set; }
}
I want to show these two view model data in one view that is
public ActionResult PBView()
{
return View();
}
This question already has an answer here:
Multiple models in a view
10 answers
html razor model-view-controller view model
html razor model-view-controller view model
edited Nov 23 '18 at 13:31
Mohammadreza Farahani
2,06131424
2,06131424
asked Nov 23 '18 at 12:53
hira shahhira shah
83
83
marked as duplicate by user3559349 Nov 24 '18 at 7:39
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by user3559349 Nov 24 '18 at 7:39
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Create a new ViewModel that contains your ViewModels and use it.
public class customViewModel{
{
public productViewModel productViewModel {get; set;}
public BcaseViewModel BcaseViewModel {get; set;}
}
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Create a new ViewModel that contains your ViewModels and use it.
public class customViewModel{
{
public productViewModel productViewModel {get; set;}
public BcaseViewModel BcaseViewModel {get; set;}
}
add a comment |
Create a new ViewModel that contains your ViewModels and use it.
public class customViewModel{
{
public productViewModel productViewModel {get; set;}
public BcaseViewModel BcaseViewModel {get; set;}
}
add a comment |
Create a new ViewModel that contains your ViewModels and use it.
public class customViewModel{
{
public productViewModel productViewModel {get; set;}
public BcaseViewModel BcaseViewModel {get; set;}
}
Create a new ViewModel that contains your ViewModels and use it.
public class customViewModel{
{
public productViewModel productViewModel {get; set;}
public BcaseViewModel BcaseViewModel {get; set;}
}
answered Nov 23 '18 at 16:58
vahidvahid
1364
1364
add a comment |
add a comment |