Effect Labs is hiring!!

November 24, 2011

Dear Reader,
This post is not on technology but on technology appliers hence might be interesting for a few. We are expanding our team both for our product and services lines.

On the product development team we are looking for a solid Android dev who is passionate about developing Android applications and loves to be a leader with his\her solutions.

On the services team we are looking for Silverlight devs (RIA being our core focus area), ASP.NET Devs with MVC experience, A web 2.0 Designer and UX researcher. On Silverlight we are looking for very solid devs and technical leaders.

If you are great at SharePoint and a self started then you can be among the first few members of our Collaborative Application Team.

We are also starting a Media Application Team and hence are looking for Flash, Action Script and Flex senior dev.

We work on cool and challenging projects and love to have people with entrepreneurial mind-set, people who like to take on big challenges, provide quick solutions and like to work on shaping up a company. We offer great projects, very high market visibility and business visibility to dev team, very high amount of responsibility and a fun filled place.

Hope this might help you if you are looking out for a cool place to work at.

bye for now.


EffectLabs team starts blogging

November 1, 2011

This is just an information post where I would like you to take a look at our team blog (http://blog.effectlabs.com) where the Effect Labs team would be writing about technology, solutions and taking deep insights to various product and market scenarios. A dedicate team of 12 bloggers are working on it and we would be expanding its services right from blogging to forums to live chat so that the dev community can get help almost anytime.

Technology Team would focus around Silverlight, RIA Development, WPF, WCF, ASP.NET MVC, SharePoint etc and Business team would be focusing on market behavior, technology evaluations, business insights to our products etc

hope our team blog would also help you finding solutions to your business problem and would be worth looking at.

thanks and bye for now.


Silverlight Reporting Support for SSRS reports – Problem and Possible solutions

November 25, 2009

After a long break, working on setting up things with the new company, I am back to blogging and would be involved looking into Silverlight development, Sharepoint and general Business problems which I encounter with my new venture.

I was working on a project a few days before and got to implement reporting support in Silverlight 3 project which doesn’t support Reporting natively or doesnt provides a control similar to ASP.NET ReportViewer Control. In this post we will look into the how we can work around this problem with the best possible solutions available for Silverlight 3.

If you try looking around for solution you will find a solution provided by Perpetuum Software http://www.perpetuumsoft.com/Silverlight-Viewer-for-Reporting-Services.aspx. They have offered a solution but due to two things I didnt go for it – 1) The print quality was not good for me 2) Its obviously costing some bucks :)

So, I tried to find how can we workaround it in a free way and leveraging the Microsoft ReportViewer Control itself. So, what we can do is we can have ASP.NET report viewer being used by our application being called by Silverlight app, which is being hosted on a ASP.NET page itself. So, from the Silverlight app when a button is clicked or some event occurs we can cause a pop-up to show the report viewer using some javascript etc.

There are 3 possible solutions which a user can go:
1) Use of pop-up window, which is called by an Event in Silverlight app and ASP.NET report viewer is being used as it is in the pop-up window. The Report customization is part of your report development.
The major issue here is pop-up blockers which by default comes with major browser and hence your pop-up would be blocked mostly causing a bad user experience. Good part is the solution works and presents you with the report.

2) Use of iframe on the same page where Silverlight app is also hosted. The iframe is hidden initially and based on the Silverlight Event this iFrame is made visible and hence we see the report inside an iframe.
Good part is it gives a good user experience and the report viewer looks continous and part of application.

3) Use some third party control like Telerik or so and they have HtmlPlaceholder Silverlight control which can be used to provide with the url of Report and it takes care of setting iFrame and writing the javascript for you to make it cross browser compliant. This approach also essentially uses the iframe way to show the reports.

Let’s look into some code snippet below which uses the iFrame way (2 approach as stated above) so that you can use them in your app if you are working out with this problem or scenario:

1) Default.aspx where the Silverlight object is hosted and iframe added by us:
(I have used inline styling for demo here but you should be using proper styling)

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="abc.Web._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>abc</title>
    <style type="text/css">
    html, body {
	    height: 100%;
	    overflow: auto;
    }
    body {
	    padding: 0;
	    margin: 0;
    }
    #silverlightControlHost {
	    height: 100%;
	    text-align:center;
    }
    </style>
    <script type="text/javascript" src="Silverlight.js"></script>
    <script type="text/javascript">
        function onSilverlightError(sender, args) {
            var appSource = "";
            if (sender != null && sender != 0) {
              appSource = sender.getHost().Source;
            }
            
            var errorType = args.ErrorType;
            var iErrorCode = args.ErrorCode;

            if (errorType == "ImageError" || errorType == "MediaError") {
              return;
            }

            var errMsg = "Unhandled Error in Silverlight Application " +  appSource + "\n" ;

            errMsg += "Code: "+ iErrorCode + "    \n";
            errMsg += "Category: " + errorType + "       \n";
            errMsg += "Message: " + args.ErrorMessage + "     \n";

            if (errorType == "ParserError") {
                errMsg += "File: " + args.xamlFile + "     \n";
                errMsg += "Line: " + args.lineNumber + "     \n";
                errMsg += "Position: " + args.charPosition + "     \n";
            }
            else if (errorType == "RuntimeError") {           
                if (args.lineNumber != 0) {
                    errMsg += "Line: " + args.lineNumber + "     \n";
                    errMsg += "Position: " +  args.charPosition + "     \n";
                }
                errMsg += "MethodName: " + args.methodName + "     \n";
            }

            throw new Error(errMsg);
        }
    </script>
</head>
<body style="background-colr:black;">
    <form id="form1" runat="server" style="height:100%">
    <div id="silverlightControlHost">
        <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="950">
		  <param name="source" value="ClientBin/abc.xap"/>
		  <param name="onError" value="onSilverlightError" />
		  <param name="background" value="white" />
		  <param name="minRuntimeVersion" value="3.0.40624.0" />
		  <param name="autoUpgrade" value="true" />
                  <strong><param value="true" name="windowless" /></strong>
		  <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0" style="text-decoration:none">
 			  <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style:none"/>
		  </a>
	    </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
        <div id="divReport" style="margin: 5% auto 0pt 18%; position: relative; z-index: 5; background-color: white; opacity: 1; float: left;">
         <iframe style="border: medium none ; margin: 0pt auto; z-index: 10; display:none;" id="_report"></iframe>
     </div>
    </form>
</body>
</html>

Here we can see that we are using a iframe which has a style of display:none which hides the iframe when the application loads.

2) In your Silverlight app. Create a button and bind an Event handler to it. In the event handler you can use the below code:

private void Btn_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            Uri sourceUri = new Uri(HtmlPage.Document.DocumentUri, Application.Current.Host.Source.ToString().Substring(0, Application.Current.Host.Source.ToString().IndexOf("ClientBin") - 1) + "/ReportViewerPage.aspx?ReportName=Report1&Client=L1");

            string wid = ContentStackPanel.ActualHeight.ToString();
            string hei = ContentStackPanel.ActualWidth.ToString();

            HtmlPage.Document.GetElementById("_report").SetStyleAttribute("display", "");
            HtmlPage.Document.GetElementById("_report").SetProperty("height", hei);
            HtmlPage.Document.GetElementById("_report").SetProperty("width", wid);
            HtmlPage.Document.GetElementById("_report").SetAttribute("src", sourceUri.ToString());
            //Above code will make the iframe solution work

            //Below code is for using pop-up window. So you can comment the code if you are only using iframe
            if (true == HtmlPage.IsPopupWindowAllowed)
            {
                System.Text.StringBuilder codeToRun = new System.Text.StringBuilder();
                codeToRun.Append("window.open(");
                codeToRun.Append("\"");
                codeToRun.Append(sourceUri.ToString());
                codeToRun.Append("\",");
                codeToRun.Append("\"");
                codeToRun.Append("\",");
                codeToRun.Append("\"");
                codeToRun.Append("width=" + wid + ",height=" + hei);                
                codeToRun.Append(",scrollbars=yes,menubar=no,toolbar=no,resizable=yes");
                codeToRun.Append("\");");
                try
                {
                    HtmlPage.Window.Eval(codeToRun.ToString());
                }
                catch
                {
                    MessageBox.Show("You must enable popups to view reports.  Safari browser is not supported.", "Error", MessageBoxButton.OK);
                }
            }
            else
                MessageBox.Show("You must enable popups to view reports.  Safari browser is not supported.", "Error", MessageBoxButton.OK);
        }

In this code we are making the src component of iframe which is a aspx page in the project called ReportViewerPage.aspx and use some query string parameters to pass the report name and parameters.

The iframe style property is changed and its height and width is set to the container above which it has to be shown and then using the windowless param of Silverlight object and CSS of setting position and z-index we can have our iframe show on top of Silverlight giving the user and impression that the reportviewer is part of Silverlight app itself.

3) ReportViewerPage.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReportViewerPage.aspx.cs" Inherits="abc.Web.ReportViewerPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
    
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>    
</head>
<body>
    <form id="form1" runat="server">
   <div>
        <rsweb:ReportViewer ID="MainReportViewer" runat="server" 
            ProcessingMode="Remote"
            Width="100%"
            Height="700"
            ShowExportControls="True"
            ShowFindControls="True"
            ShowParameterPrompts="False"
            ShowPromptAreaButton="False"
            ShowRefreshButton="False"
            ShowPrintButton="true"
            ShowZoomControl="true"
            ZoomMode="Percent"
            BackColor="White" >
            <ServerReport DisplayName="MainReport" ReportServerUrl="" />
        </rsweb:ReportViewer>
    </div>
    </form>
</body>
</html>

4) ReportViewerPage.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.Reporting.WebForms;
using System.Configuration;

namespace abc.Web
{
    public partial class ReportViewerPage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            MainReportViewer.ProcessingMode = ProcessingMode.Remote;
            MainReportViewer.ZoomMode = ZoomMode.Percent;
            MainReportViewer.ZoomPercent = 100;
            MainReportViewer.ServerReport.ReportPath = ConfigurationSettings.AppSettings["ReportPath"] + this.Request.QueryString["ReportName"];
            MainReportViewer.ServerReport.ReportServerUrl = new Uri(ConfigurationSettings.AppSettings["ReportServerUrl"]);
            List parameters = new List();
            List values = new List();
            values.Add(this.Request.QueryString["Client"]);
           
            ReportParameter oneParamter = new ReportParameter("Client", values.ToArray());
            values.Clear();
            string apars = this.Request.QueryString["Apar_Id"];
            values = apars.Split(new[] { "," }, StringSplitOptions.None).ToList();
            ReportParameter twoParamter = new ReportParameter("Apar_Id", values.ToArray());

            parameters.Add(oneParamter);
            parameters.Add(twoParamter);
            MainReportViewer.ServerReport.SetParameters(parameters.ToArray());
            MainReportViewer.ShowParameterPrompts = false;
            MainReportViewer.ServerReport.Refresh();
        }
    }
}

This page reads the parameter passed by iframe src property and then parses the query string to make a Report Server call. The parameters are passed using Report parameter and if your report is set to take parameters then these parameters would be used to show the report in the Report Viewer.

You need to provide ReportServer url like http://localhost/ReportServer and ReportPath like “/FirstReport/” which will be appended by specific report name send by the Silverlight app. So finally it should look something like – http://localhost/ReportServer/FirstReport/MyReport

You need to prepare a report for the above to work and have it hosted on your server (localhost or external server) and then point the add in this program to your server.

This overall is a simple way to get the SSRS Report being shown in a ASP.NET along with Silverlight app hosted but giving the impression that Reporting support is part of Silverlight app itself.

I Hope this will solve your problems if you are working on this scenario. Write back if you find any issues or clarification regarding any code.

I have a working solution with my and have tested the code with local and external report server and it works just fine.

Good day!!
bye for now.


Co-Founding Effect Labs – bringing dream to reality – mix of passion, hard work and big Dreams :)

August 14, 2009

I was out of blogging arena for past few months… the title should give some hint on what I was busy with. I with my two friends has set up an IT consulting firm called Effect Labs (http://effectlabs.com) which focus on Silverlight and Sharepoint based custom application development.

Effect Labs

Journey:

Since my Microsoft days, it was there somewhere but due to several things going within and around, it just didn’t came out then. Though to keep myself ignited I joined a services start-up so that I see the services side of the software industry and explore various opportunities.

That was the time when I and my friends joined together and we were hardcore thinkers of the product development in the area of Tourism, Media Studio, GPS based systems, Controls making company, Silverlight based CMS system, Job portal industry, Online test platform and actually various other options and opportunities. We all had our own thinking for the products and we finally came close on a few. But due to lack of funding and recession hitting at the same time our conversations didn’t went well with the investors. This left us thinking again.

Since all three of us had really good experience with the services industry and had different expertise with some common technologies to work with. This made us think seriously in the direction of setting up an IT services firm and helping businesses with the custom processes where we are good and some of the cool things we do here. One of us being highly creative with programming :)   and playing with Silverlight it came out really well to be used as one of the pillars, Another being highly experienced with SharePoint custom development and integration with Silverlight it came out as another pillar and ASP.NET\MVC\jQuery\JSON\WCF etc is common across us so this helped us concentrating on Microsoft technologies as well as playing the common work area.

These pillars helped us setting up a plan where we keep out instinct of being on the product side up too but just putting say a small holding time. We planned to start with Services offerings, working parallel in developing customized solutions as these work well in form of packaged services products like Silverlight controls, media kit etc Setting up these two and establishing good process and name among clients would take a bit of time but would help us leveraging out strengths to product development too.

There are many things if I talk about service offerings but I think its already a lot written above about the company so I will write things what I feel like about a company. Just to showcase the offerings in a splash here it goes – custom process setup using TFS 2008 – complete project management and collaboration with integration of VS, TFS, Sharepoint, SSRS etc and customizing TFS process templates according to a company or project needs, Custom application development using various Microsoft technologies like ASP.NET 3.5, ASP.NET MVC, C# 3.5, WCF, WPF, Expression Blend, Silverlight (Prism, Caliburn), Sharepoint etc. and various other technologies, platforms and tools like Photoshop, jQuery, Ajax with JSON, javascript, Ext-JS etc. We bring in high quality and great user experience in the works we do and have done. There’s much to say here but lets put a stop now.

I follow and would suggest one thing – Think what you do and do what you love.  This is really very important and separates you. If you are reading this I would say to ask yourself a question – am I happy doing what I do today? (you cant be satisfied since it stops progress) If the answer is YES then you are on the right path but if it NO then this is the right time to think and find out a way to do what interests you because it gives a lot of pleasure and ultimately you progress the best in your interest area.

I hope this journey would be extraordinary and keep me on my toes always. There a long way to go and a lot of patience at this stage is required. We are fortunate to get a good start but still have seen hard time during this last 3 months – Patience and self motivation are key in this practice.

I have taken up the role of Techno\Business person in the company where I do coding, learn and implement new technologies, come up with working demos and finding process\software optimizations etc as well as looking into business expansion, doing strategic partnerships, maintaining business relationship so that we get recurring business etc There’s a lot involved actually.

I would now be writing a mix of both technology and business in due course. Hope the experience would be good.

Thanks.


Using IFrames for multiple file uploads and using jquery to communicate between main document and iframes

May 11, 2009

In this post we will look into how we can use iframes to do multi file upload and also how we can use jQuery to communicate between the main document and a specific iframe (among many iframes).

So, the scenario here is we have a page with multiple file upload depending upon some data. We will use a repeater to deal with the data and hence we get ‘n’ rows of file upload depending upon the datasource. The iframe elements are kept inside repeater as shown below. Here we will see how we can trigger specific iframe events and then try to do validations and data communication between the main page and an iframe using jQuery. The communication is done with the help of accessing current pages elements and then setting the iframes hidden element with the values we got on the current page. The set values are then used by code behind of the iframe file upload page or the javascript of that page. So, in another way we achieve both file upload and parameter passing in this type of scenario.

multiple file uploads

multiple file uploads

Code Example1: Page = Main.aspx

<asp:Repeater runat="server" ID="rptAdData" OnItemDataBound="rptAdData_ItemDataBound">
    <asp:Label CssClass="flHeight" ID="flHeight" runat="server"></asp:Label>
                                <asp:Label CssClass="flWidth" ID="flWidth" runat="server"></asp:Label>
                                <asp:Label CssClass="flCrTypeName" ID="flCrTypeName" runat="server"></asp:Label>
                                <asp:Label CssClass="lblAds" ID="lblAdIDs" runat="server"></asp:Label>
                                <asp:Label CssClass="lblSkus" ID="lblSkuIDs" runat="server"></asp:Label>
                                <asp:Label CssClass="lblCrSize" ID="lblCrSizeID" runat="server"></asp:Label>
                                <asp:Label CssClass="lblCrType" ID="lblCrTypeID" runat="server"></asp:Label>
    <div id="divFrameOuter" style="margin-top: 5px;">
                                    
    </div>
</asp:Repeater>

Code Example 2: Page = Main.aspx, Code = jQuery

<script type="text/javascript">
        $(document).ready(function() {
         $('iframe').load(function() {
                var parent = $(this).parent();
                var lblHeightIframe = $(this).contents().find("body .lblHeightInner");  //Finding the height element in iframe page -- the value will be set with this pages label element 
                var lblWidthIframe = $(this).contents().find("body .lblWidthInner");
                var lblTypeNameIframe = $(this).contents().find("body .lblTypeNameInner");
                var lblCampaignIdIframe = $(this).contents().find("body .lblCampaignIdInner");

                lblWidthIframe.attr('value', parent.children('.flWidth').text().trim());
                lblHeightIframe.attr('value', parent.children('.flHeight').text().trim());
                lblTypeNameIframe.attr('value', parent.children('.flCrTypeName').text().trim());
                lblCampaignIdIframe.attr('value', campaignId);
            });
 });
</script>

Code Example 3: Page = Photoupload.aspx

<%@ Page Language="C#"  AutoEventWireup="true"  CodeFile="PhotoUpload.aspx.cs" Inherits="PhotoUpload" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
</head>
<body style="margin:0px" onload="initPhotoUpload()">
<form id="photoUpload" enctype="multipart/form-data" encoding="multipart/form-data" runat="server">
      <div id="uploadBlock" style="float: left; width: 30%;">
          <div id="divFrame">
              <div>
                <input id="filPhoto" type="file" runat="server"/>
            </div>
            <div id="divUpload" style="padding-top:4px">
                <input type="hidden" id="lblHeight" class="lblHeightInner" value="" runat="server" />
                <input type="hidden" id="lblWidth" class="lblWidthInner" value="" runat="server" />
                <input type="hidden" id="lblTypeName" class="lblTypeNameInner" value="" runat="server" />                
                <input type="hidden" id="lblCampaignId" class="lblCampaignIdInner" value="" runat="server" />
                <input id="btnUpload" type="button" class="btnSimple" value="Upload Creative" />
            </div>
          </div>
</form>
</body>
</html>

There is some javascript too in the photoupload.aspx and it depends on how you want your particular file uplaod to work or else you can write me for that. In the code behind I have done thumbnailing and also taken care of reuploading new file using the same fileupload button.

So, once we are done with file upload in the Main.aspx I can write an event for ‘btnUpload’ button of photoupload.aspx page so that the event is catched at the parent page and some sort of validations like atleast on file is upload or so etc can be done and appropriate error message can be shown.

I hope this will be helpful to you. You can write to me at sushant.pandey@gmail.com in case of any queries or source code.

bye for now.

-Thanks


TFS 2008 Tips and Tricks: Enable Get Latest on Check Out

February 26, 2009

In this post we will look into how can we enable get latest when doing check-outs while using TFS 2008. In case of a general development team where multiple devs are working on a project and modifying different portion of it we cant have exclusive locks most of the time as it restricts the capabilities of parallel or fast sequential development. So, in this type of general scenario we see the requirement of automatic get latest when somebody checks out a file as it would help in later merging of the file with server version.

TFS 2008 provides us with this option in team project settings -> souce control -> to select the option of get latest on check out. To find this option go to Team Explorer, if Team Explorer is not visible along with solution explorer then go to visual studio menu and under view you can find team explorer. Click it to open team explorer which will show all the team projects assigned to you. You can find source control link under team project too but this is not what we have to use here instead we have to find the source control by right clicking team project name as shown below:

checkout-1

Now when we click on source control the below window gets opened where we have to click get latest on check out option as outlined in the image too:

checkout-21

Hope this helps in case you are looking for it too.

bye for now.

-Sushant


jQuery: Get formatted Date from returned JSON data

February 25, 2009

Recently I was working on using client side template to show a tabular data and one of the columns was a date field. The return data was an enumerable type i.e. List of objects containing the System.DateTime (date) field for representing date. When I looked into the date column in my client side grid on browser I was surprised to see the resulted date in form of “/Date(998667000000)/” (the date data might not be exact as I have put how it looks like) which of kind of unexpected and then led to find how to get javascript Date object from the JSON returned date.

So, In the returned data we get JSON serialized date which is in ticks and hence causes problems at the client end as we can’t treat it as javascript date. Eval() fails in coverting it and returns error saying that the format of date is not correct. Now, to resolve this I liked this approach. Use the reviver function which can be used while doing JSON data parsing with JSON.parse function. You can look at http://www.json.org/js.html to know more about reviver funciton.

[from json.ord]
var myObject = JSON.parse(myJSONtext, reviver);

The optional reviver parameter is a function that will be called for every key and value at every level of the final result. Each value will be replaced by the result of the reviver function. This can be used to reform generic objects into instances of pseudoclasses, or to transform date strings into Date objects.

[/from json.ord]

So, here is a sample jQuery ajax call implementation which can be used as part of any event in your javascript file and would work for you. The pre-requisite here is to have JSON.js file included so that JSON object is understood by the interpreter and it doesnt break client side code.


//methodName -> The WebMethod name you want to call from ajax
//paramArray  -> Array of parameters which will be converted as JSON params in this function
//successFunction  -> name of successfunction to be called if ajax call succeeds
//errorFunction-> name of error Function to be called if ajax call fails

function ClientProxyDateFormatted(methodName, paramArray, successFunction, errorFunction) {
    var pagePath = window.location.pathname;
    var paramList = '';

    if (paramArray.length > 0) {
        for (var i = 0; i < paramArray.length; i += 2) {
            if (paramList.length > 0) paramList += ',';
            paramList += '"' + paramArray[i] + '"' + ':' + '"' + paramArray[i + 1] + '"';
        }
    }
    paramList = '{' + paramList + '}';
    $.ajax({
        type: "POST",
        url: pagePath + "/" + methodName,
        contentType: "application/json; charset=utf-8",
        data: paramList,
        dataType: "text",
        processData: false,
        success: function(msgg) {
            var msg = JSON.parse(msgg, function(key, value) {
                var a;
                if (value != null) {
                    if (value.toString().indexOf('Date') >= 0) {
                        //here we will try to extract the ticks from the Date string in the "value" fields of JSON returned data
                        a = /^\/Date\((-?[0-9]+)\)\/$/.exec(value);
                        if (a) {
                            var dt = new Date(parseInt(a[1], 10));
                            //getMonth return months with index 0 so you need to add 1 to get the correct month value.
                            return dt.getMonth() + 1 + "/" + dt.getDate() + "/" + dt.getFullYear();
                        }
                    }
                    return value;
                }
            });
            successFunction(msg);
        },
        error: function() {
            errorFunction();
        }
    });
    return false;
}

This seemed to me as a good problem and hence I think it would be useful to you in case you are facing similar issue. Let me know if it helps or doesnt help :)

bye for now.

-Sushant


Follow

Get every new post delivered to your Inbox.