GenesysStack.com
RSS

Blog posts of '2016' 'November'

Did You Know that you can use standard ISO 8601 Dates with the DataContractJsonSerializer class?
Did You Know that you can use standard ISO 8601 Dates with the DataContractJsonSerializer class? By default, the DataContractJsonSerializer class expects dates in the format of Date(ticks). This is problematic, because ASP.NET Web API returns dates in ISO 8601 format. * Default date: "{\"BirthDate\":\\\/Date(248860800000-0800)\\/\ * ISO 8601 date: "{\"BirthDate\":\"1982-11-16T00:00:00-08:00\"}"
Did You Know that you can capture results from a Stored Procedure into a Table variable?
Did You Know that you can capture results from a Stored Procedure into a Table variable? -- Save Time Range in central stored procedure DECLARE @Result TABLE (ID INT) InsertInto @Result Exec [Entity].[TimeRangeSave]@BeginDate, @EndDate, @ActivityID Select @TimeRangeID = ID From @Result
Did You Know that you can clear MVC TextboxFor default values?
If you like strongly-typed Views...the trick is the Value Html attribute. Not “value”, “Value”. For example: @Html.TextBoxFor(m => m.BirthDate, "{0:MM/dd/yyyy}", new { @id = "txtBirthDate", @class = "form-control BirthDate", @Value = Model.BirthDate == "01/01/1900" ? "" : Model.BirthDate.ToString(), @placeholder = "MM/DD/YYYY" })