2008年4月29日 星期二

ASP.NET 如何讓 GridView 強制使用指定之欄寬

於 rowdatabound 事件中加入

e.Row.Cells[1].Attributes.Add("style", "word-break:break-all;word-wrap:break-word;");

Entity Framework 建立新物件並儲存後馬上取得關聯資料

使用 CreateProxy 建立物件,不要直接 new var newmodel = _contextXXX.CreateProxy<yyy>(); ... _contextXXX.yyy.Add(newmodel); await _contextXXX.SaveC...