Monday, 30 March 2015

Getting json response as object

 [WebMethod]
    [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
    public static IEnumerable<SearchInfluencers.InfCategories> GetICategories()
    {
        return DAFindInflueners.GetInfluencersCountByCategory().OrderBy(i => i.ICATEGORYNAME).ToList();
    }


//---In js file
 success: function (Catlist) {
            $.each(Catlist.d, function (index, Cat) {
                alert(Cat.ICATEGORYID + Cat.ICATEGORYNAME + Cat.ICATINFCOUNT')
            });  

Sunday, 29 March 2015

Create and consume wcf service..

http://www.webcodeexpert.com/2013/04/how-to-create-and-consume-wcf-services.html

Wednesday, 18 February 2015

Selecting multiple rows as single row in sql server

SELECT STUFF((SELECT DISTINCT ','+CONVERT(VARCHAR(10), MO_CC_ID) from NEWMAKE_OFFER WHERE MO_FU_ID=546 for XML path('')),1,1,'')

Friday, 12 September 2014

Getting Query string value in aspx page

 <%# string.Format("{0}", Request.QueryString["value"])%>

Disable right click option using jquery

$(function(){
        $(this).bind("contextmenu", function(e){
        e.preventDefault();
          alert("right click is disabled"); //not recommended to give alert message
    });

});

Thursday, 5 June 2014

Very use ful for image map coordinates

for example, you can get full view of each mandal details using the coordinates

http://www.mapsofindia.com/maps/andhrapradesh/districts/prakasam-district-map.jpg

http://www.maschek.hu/imagemap/imgmap

Extracting Nupkg files using command line

Rename it to zip first then extract files as below 1.     Rename-Item -Path A_Package.nupkg -NewName A_Package.zip 2.     Make sure to repla...