简体   繁体   中英

Injecting UI in ASP.NET- MVC using UNITY 2.0

I am using UNITY 2.0 with MVC 3.

I have injected types using the container into MVC.net solution. All this while the types were non-UI component.How can I inject a type which has UI ?

The solution i can think of is to write UI rendering Code somethign like following and wrap it with a C# Type.

class HTMLHelper    
{   
    string spitTable()   
    {    
        string strUITable = "<Table><TR><TD><TD></TR></Table>";      
        return strUITable ;   
    }   
}

Is it correct way of doing thing ? Any one having better solution ?

Iam using ASP.NET MVC and still prefer to use the shtml files :)

I think i got my answer , it's WCSF(web client software factory). also look for 'Composite web UI application block'.

http://webclientguidance.codeplex.com/

also look into

http://blogs.msdn.com/b/blaine/archive/2010/03/22/will-wcsf-vs-2010-version-support-unity-2-0-and-asp-net-mvc.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM