阅读背景:

使用helper方法对MVC3 / Razor中的下拉列表进行排序的最佳方法

来源:互联网 

Hi so I'm pretty new to MVC3 and Razor and I've been trying to get my head around it the past few days. I've been given a task by my project architect to create a helper method that sorts a drop down list in an MVC View. I have a View that retrieves various data from a Controller and I'm returning some values that I want to appear in a drop down list. I've been told not to sort it in the Controller and also to pass the field that we want to sort by into the helper method. I could do it like below but the architect wants to keep the view free of c sharp code:Hi so I'm pretty new to MVC3 and Razor and I've




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: