原创 asp.net MVC: PagedList + View Model

To pass view model with PagedList:1. Controller action must use HttpGet and use View Model as action parameterpublic Ac

原创 MVC - File download action

http://stackoverflow.com/questions/5826649/returning-a-file-to-view-download-in-asp-net-mvcpublic ActionResult Download

原创 Windows Azure - Error of "MEDIA12899: AUDIO/VIDEO: Unknown MIME type" and Blob Storage

We have a Azure website using JPlayer to play audio/video (mp3 or mp4) stored in Azure Blob storage. Some media is play

原创 LINK - Windows Azure Storage - 跨域訪問策略 CROS

CROS by codehttp://blogs.msdn.com/b/windowsazurestorage/archive/2014/02/03/windows-azure-storage-introducing-cors.aspxC

原创 LINK - Objective-C to C#

https://lostechies.com/scottreynolds/2009/02/05/beginning-objective-c-for-the-c-guy/http://developer.xamarin.com/guides

原创 LINK - Windows Azure - Clone of SQL Azure

http://blog.idera.com/sql-server/how-to-make-a-copy-of-a-database-on-windows-azure-sql-database/The exact command to ru

原创 Service References to a MTOM web services

In VS2013, we tried to add a web service wsdl and the reference.cs is always empty. As per the web service provider, we

原创 Diskpart - convert disk to gpt format

Convert to disk to GPT format:> Diskpart> List Disk> Select Disk {n}> Clean> Convert gpthttps://technet.microsoft.com/e

原创 EF6 Database First (DbContext) - Change Schema at runtime

Problem:There are two SQL databases (dev and live) with on Azure which has identical table structures but different tab

原创 Azure Website - UTC Time and Local Time

Key: Azure Website uses UTC time on the serverHow to: show local time in website UI?Solution:#1 Use TimeZoneInfo to con

原创 LINK - Paging for Azure Mobile Service Custom API (JS)

LINK - http://blogs.msdn.com/b/azuremobile/archive/2014/06/04/enabling-paging-with-total-count-for-tables-with-custom-r

原创 ASP.NET MVC - loop model data in javascript

Key: razor syntax using @: before the js variable in c# code blockExample: var chartData = []; @for(int i=0; i

原创 MVC - Pass array from model to JS

var yourJavaScriptArray = @Html.Raw(Json.Encode(Model.YourDotNetArray));LINK - http://stackoverflow.com/questions/38509

原创 ASP.NET MVC - Display UTC time from server as local time on client side

View html:<span class="utcdatetime">@user.MostRecentTestDate.Value.ToString("M/dd/yyyy hh:mm tt UTC")</span>View js:(ne

原创 Windows Azure Mobile Service - Logs for diagnostics

If you get stuck on client side Mobile Service error and the error message is less useful, try to see the Logs tab in y