2013年9月26日 星期四

取得或設定 checkbox 值

取值 : $('#123').prop('checked')
設定 : $('#123').prop('checked',true)

何時使用 prop() 存取屬性?
存取屬性 checked、selected、disabled 使用 prop(),其他屬性則用attr()

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

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