Portable class library with asmx soap service

Recently I was working on a portable class library(PCL) example in VS2012 to create a proxy class for an external asmx soap service with return types DataTable and DataSet. The easiest way to create a proxy class to add a service reference. In my case, it failed. The add service reference generated codeĀ  contains XmlElement and failed to generate response messages with DataTable and DataSet. VS2012 gives a warning for Xml Element. Read more

Sharepoint 2010 Registering script files in a WebPart

Sharepoint 2010 provides a custom tag ScriptLink to register script files in a webpart. This can also be done using simple html script tag but using ScriptLink ensures all the sharepoint script namespaces are available for your custom script.

All the scripts that are to be registered should be placed in Layouts/ProjectName folder of your project. By default, when you create a project Layouts folder will not be added. Read more

Rendering Bing search with JSRender using API

JSRender is a jscript template engine very much similar to JQuery templates. It is replacing JQuery templates in the near future and still in beta. The main advantage of any template engine is to reduce the jscript code for rendering dhtml with some data. JSRender can be used with or without using JQuery. Read more

MVC3 Unobtrusive validation for checkbox

When using unobtrusive validation for checkboxes, it does not validate an unchecked checkbox which is marked as required. Its a known issue. By default, all the checkbox required conditions are ignored in unobtrusive validation.

A workaround for this issue is to add a custom attribute and some code change in the unobtrusive JavaScript library. Read more