如何将类库输出属性传递给mvc4中的视图页面? [英] How to I pass class library output property to view page in mvc4?

查看:72
本文介绍了如何将类库输出属性传递给mvc4中的视图页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从不同的项目调用或访问MCLELDescription属性



MCLELDescription在类库项目中声明



我尝试过:



公共类ClusterDetails

{

public ObservableCollection< SelectListItem>参数;

公共字符串MCLELDescription {get;组; }

}

Call or access the MCLELDescription property from different projects

"MCLELDescription" is declared in class library project

What I have tried:

public class ClusterDetails
{
public ObservableCollection<SelectListItem> Parameters;
public string MCLELDescription { get; set; }
}

推荐答案

添加库项目的引用,然后使用< namespace>在您的代码中,您可以将类ClusterDetails传递给View。
Add reference of the library project and then with using <namespace> in your code you can pass the class ClusterDetails to View.


这篇关于如何将类库输出属性传递给mvc4中的视图页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆