Home > Asp.net MVC

Alphanumeric Sort Using PadNumbers

Problem Statement: Sort the Alphanumeric values Solution : below is the Code that helped to sort the alphanumeric values Example : you have the list var List = {a1,ba3,aa2,a2,ba2,aa3}; we can not sort this directly using [crayon-62b82c6190cd0523109898/] so to sort this we need to PadNumbers to value and then sort the List. with the help

This Article is TAGGED in , , . Read more

Backup and restore SQL Database to Azure Blob Storage Service in C#

Microsoft Azure Blob Storage is a scalable, online cloud data storage service that stores data blobs in containers. This article helps you understand how to write backups to and restore from the Azure Blob Storage Service and to do so we will create an Azure Blob Container, credentials for accessing the

This Article is TAGGED in , , , , , . Read more

Format of data from controller to set different colors for each column in highcharts

If there is case where it is necessary to distinguish data based on color e.g if data is below specified number it should be in red color and above it in green color. In that case data to the highcharts should be with color code. [crayon-62b82c619178c564251336/] In method getColor1(int a), you can

This Article is TAGGED in , . Read more

MaxJsonLength exception in ASP.NET MVC during JavaScriptSerializer

Problem Statement:  The following exception (error) occurs in ASP.NET when AJAX calls are made to PageMethod using jQuery AJAX or ScriptManager Error during serialization or deserialization using the JSON JavaScriptSerializer. "The length of the string exceeds the value set on the maxJsonLength property." Below code that helped to resolve the issue. Instead of

This Article is TAGGED in , . Read more

Auto refresh charts using highcharts.js

Highcharts is a pure JavaScript based charting library meant to enhance web applications by adding interactive charting capability. Highcharts provides a wide variety of charts. For example, line charts, spline charts, area charts, bar charts, pie charts and so on. So there may be need of drawing chart with updated data

This Article is TAGGED in , , . Read more

How to get client machine datetime with local timezone offset value

This article will help to understand how to get  client machine's datetime with local timezone offset value. Use javascript method getTimezoneOffset() and assign it's value to hidden field in .cshtml file as shown in below code. Then pass this value to mvc controller. [crayon-62b82c619211c033218613/] In the above code, variable offset will have the

This Article is TAGGED in , . Read more