Code tells:Categoryhas_many Forums,Name,nSortOrder,Forumbelongs_to Category,has_many Users as Moderators,has_many! Threads,has_many Posts,has_one? Post as LastPost : Last of Posts on
近一段時間來,不少人對RoR推崇備致,認為是最好的Web開發架構,順帶罵一聲Web Forms的複雜性和過度封裝。我對RoR也懷有謹慎(因為畢竟沒有在現實項目中使用過)的好感,認為它在很多情況下確實能提高不少開發效率,但是如果說Web Forms與之相比一無是處,我卻不能苟同。至於原因,我認為有以下幾點:1, Web
在ActiveRecord裡可以寫這樣的代碼:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> [PrimaryKey(Access = PropertyAccess.NosetterLowercase)] public int Id { get { return id; }
我們知道,建立可排序的GridView後,點擊一下列頭,會以該列以小到大的順序(SortDirection.ASC)排序,再點一下此列頭會以從大到小的順序(SortDirection.DESC)排序.如何才能使這個過程反過來,也就是預設第一次排序以從大到小的順序進行呢?不幸的是GridView並沒有提供類似DefaultSortDirection之類的東西讓我們來設定,所以必須通過代碼:Code highlighting produced by Actipro CodeHighlighter (
修改自:ftp://www.ultraedit.com/wf/velocity.txt刪除了一些廢棄的Html標籤,刪除原來帶大部分屬性,把大寫改成小寫。/L13"Velocity" Nocase Noquote HTML_LANG Line Comment = ## Block Comment On = #* Block Comment Off = *# Block Comment On Alt = <% Block Comment Off Alt =%> String
以下所提到的控制項/組件均為開源或免費的。1,ComboBox控制項: Upgrade Your Select Element to a Combo Box2,DateTimePicker控制項: GrayMetterSoft3,TabStrip控制項: A simple ASP.NET Web TabStrip User Control4,Grid控制項: XGrid5,資料結構Tree: A Generic Tree Collection6,csv檔案<->DataTable: