Microsoft SDKs download

Posted by Unknown 0 comments

Microsoft SDKs Download



In this post you can find all use full Microsoft developer sdks at a glance you can download from bellow links


Microsoft SDKs

Windows Azure Downloads
Web Development Downloads
Social Downloads
Labels: , ,

Microsoft Developer downloads

Posted by Unknown 0 comments
Microsoft Developer downloads 

n this post you can find all use full downloads for Microsoft developers at a glance



Visual Studio

Server, web, & Windows Azure

Client development

Windows Phone & game development

MSDN Subscriptions

MSDN Subscribers get access to more Microsoft products and tools to use for developing and testing applications, such as:
Labels: , ,

PetaPoco with Asp.Net MVC Example

Posted by Unknown 1 comments
PetaPoco with Asp.Net MVC Example

in this post am going to explain you about  PetaPoco with Asp.net MVC.

 what is peta poco?
PetaPoco is small ORM developed by the  topten software,as its very tiny and very faster and single file micro ORM

Features with PetaaPOCO

  • it is very easy to add any project
  • its supports strongly typed POCO's
  • its supports dynamic objects expando too
  • it supports close relation ship between object and database table
  • easy transaction supports
it is a open source
you can download from bellow links
There are lots of examples available on following page.
http://www.toptensoftware.com/petapoco/

Here i found very good example to implement CRUD operations you can go through it

Hope this will helps you
Labels: ,

sending SMS in asp.net via way2sms api

Posted by Unknown 6 comments
sending SMS in asp.net via way2sms api

In this post am going to explain you about how send the SMS in asp.net with way2sms api

Here is the simple code snippet which will allows you to send the sms from your asp.net web site.

i have writen a method which will takes username , password ,message,Tonumber as as inputs and send the sms via way2sms.it will from the url and send the web request



 public void sendSMS(string username, string pwd, string message, string Tonumber)  
 {  
   HttpWebRequest Req = (HttpWebRequest)WebRequest.Create("http://ubaid.tk/sms/sms.aspx?uid=" + username+ "&pwd=" + pwd+ "&msg=" + message + "&phone=" + Tonumber+ "&provider=way2sms");  
   HttpWebResponse Resp = (HttpWebResponse)Req.GetResponse();  
   System.IO.StreamReader respStreamReader = new System.IO.StreamReader(Resp.GetResponseStream());  
   string responseString = respStreamReader.ReadToEnd();  
   respStreamReader.Close();  
   Resp.Close();  
 }  


Hope this will helps you
Labels: ,

distinct by field LINQ c# use MoreLinq

Posted by Unknown 0 comments
Distinct by field in  LINQ c# use MoreLinq

C# enhances Linq to Objects implementation in distinct method.which we can get values distinctly by a filed name in enumerable by using distinctBy method.this extention method we can get by the nuget packages
you can down load the extensions from this link click Here to get dll

Example :Mylist..DistinctBy(x => x.Name).ToList(); 

the inner implementation determines by projection and equality comparer of the projected type

in order to use this package we need to get the reference of

MoreLinq.Source.MoreEnumerable.DistinctBy

 Hope this will helps you
Labels: ,

LINQ sorting using Lambda Expressions with dynamic field names

Posted by Unknown 0 comments

LINQ sorting using Lambda Expressions with dynamic field names

In this blog am going to explain you how sort the Linq collection by the dynamic field names
in order to archive this we nee to use reflection

Here is the small code block will overrides the order by functionality to pass filed names dymamically


 public static IEnumerable<T> OrderBy<T>(  
     this IEnumerable<T> collection,   
     string columnName  
     )  
 {  
   ParameterExpression param = Expression.Parameter(typeof(T), "y");  // y  
   Expression property = Expression.Property(param, columnName);    // y.ColumnName  
   Func<T, object> lambda = Expression.Lambda<Func<T, object>>(    // y => y.ColumnName  
       Expression.Convert(property, typeof(object)),  
       param)  
     .Compile();  
   Func<IEnumerable<T>, Func<T, object>, IEnumerable<T>> expression = (c, f) => c.OrderBy(f);   
   IEnumerable<T> sortedlist = expression(collection, lambda);  
   return sortedlist;  
 }  


Based on the above function we can use as bellow


IEnumerable<T> Mylist= ...
IEnumerable<T> orderedList = Mylist.OrderBy("PropName");



Hope this will helps you

Labels: ,

Identifying the properties of an object in C#

Posted by Unknown 0 comments
Identifying the properties of an object in C#:

To identify the properties of the objects in c#  we need to use reflection assembly
here we have property info class to get the information of the object of c#

Reflection which allows you to the create dynamic instance of a type or get properties of the existing type and get its methods and properties

Here is the simple example to set and get the value the property of an object


Employee obj=new employee();
string Name="Ram";
PropertyInfo info=obj.GetType().GetProperty("EmpName");
info.SetValue(obj,Convert.ChangeType(Name,info.PropertyType),null);


Hope this will helps you








Labels:

how select default folder in file upload control in asp.net

Posted by Unknown 0 comments
how select default folder in file upload control in asp.net

i found a problem with asp.net file load control is that we don't have option to set a default folder while file browser opened .
In order to archive these i found some other alternatives where we can  get more options while uploading the file like multiple uploads,drag and drop files to upload etc

one is silk upload is best option which having many functionality related to file uploading
here you can fine the links 

http://slickupload.com/demos

we can do this by flash also check bellow link

http://www.codeproject.com/Articles/15742/Multiple-File-Upload-With-Progress-Bar-Using-Flash



See demo Bellow




Hope this will helps you

Labels: , ,

Excel kind of filters in Kendo UI Grid

Posted by Unknown 0 comments
Excel kind of filters in Kendo UI Grid

 In this post am explaining  how to implement excel kind of filters in kendo ui grid.
See example Bellow
new


Step 1:Grid intialization
var isloaded=false;
grid = $("#grid").kendoGrid({
            dataSource: {
                transport: { read: "/control/action(or your URL)" },
                schema: { data: "Data", total: "Total" },
                pageSize: 30,
                serverPaging: false,
                serverFiltering: false,
                serverSorting: false
            }
});

Step 2:
Need to Override the required field filter functionality. So find out filter click of particular column and unbind the click event and write click for custom filter

Before that write DIV for showing our custom filter

<div id="CustomFilterDiv" class="filterDropdown">
 </div>
<style>
    .filterDropdown {
        display:none;
        position: absolute;
        border: 2px solid gray;
        background-color: white;
        padding: 5px;
    }
</style>
Here is the code for overriding filter click Functionality
$("#grid").find(".k-grid-filter").each(function () {
            var parent = $(this).parent();
            var filterList;
           
            //alert(parent.attr("data-field"));
            switch (parent.attr("data-field")) {
                case "Status"://*your data filed name*//
                   $(this).unbind("click").click(function () {

                        fillCheckBoxes();
                        filterList = $("#CustomFilterDiv");
                        var offset = $(this).offset();
 filterList.css('top', offset.top + $(this).height()+10)
.css('left', offset.left + $(this).width()).slideDown();
                        return false;
                    });
                    break;
                           
            }
});
Step3:
Here we need fill our dropdownDIV with checkboxes of all unique values of a selected column
  function fillCheckBoxes() {  
       if (!isloaded) {  
         $("#CustomFilterDiv").empty();  
         $("#CustomFilterDiv").append('<input type="checkbox" style="" name="StatuschkAll" value="checkAll" checked /><span>Select All</span><br />');  
         var data = grid.data("kendoGrid").dataSource.data();  
         var uniqueValues = '';  
         for (var i = 0; i < data.length; i++) {  
           var dataItem = data[i].Status;  
           if (!(uniqueValues.indexOf(dataItem)>=0))  
           {  
             uniqueValues += dataItem + ",";  
             $("#CustomFilterDiv").append('<input type="checkbox" style="" name="Status" value="' + dataItem + '" checked /><span>' + dataItem + '</span><br />');  
           }  
         }  
         $("#CustomFilterDiv").append(' <br /><input type="button" id="applyStatusFilter" value="Apply" /><input type="button" id="cancelStatusFilter" value="Cancel" />');  
         //filter apply click  
         $("#applyStatusFilter").click(function () {  
           setDsFilter(generateDsFilter());  
           $("#CustomFilterDiv").slideUp();  
         });  
         //filter cancel click  
         $("#cancelStatusFilter").click(function () {  
           $("#CustomFilterDiv").slideUp();  
         });  
         //check all filter  
         $('input[name="StatuschkAll"]:checkbox').live("change", function () {  
           var ischecked = $(this).is(":checked");  
           $('input[name="Status"]:checkbox').each(function () {  
             this.checked = ischecked;  
           });  
         });  
         //uncheck/check parent all  
         $('input[name="Status"]:checkbox').live("change", function () {  
           $('input[name="StatuschkAll"]:checkbox')[0].checked = $('input[name="Status"]:checkbox:checked').length == $('input[name="Status"]:checkbox').length;  
         });  
         if(uniqueValues!='')  
            isloaded = true;  
       }  
     }  
     $("#grid").click(function () {  
       $("#CustomFilterDiv").slideUp();  
     });  
   }  
Step 4:

Generate the filter query based on selection of dropdownDIV


  function setDsFilter(customFilter) {  
     grid.data("kendoGrid").dataSource.filter(customFilter);  
   }  
   function generateDsFilter() {  
     var checkboxContainer = $("#CustomFilterDiv");  
     var flt = { logic: "or", filters: [] };  
     checkboxContainer.find("input:checked").each(function () {  
       var name = $(this).attr("name");  
       var value = $(this).attr("value");  
         if (value == 'null')  
        flt.filters.push({ field: name, operator: "eq", value: null });  
        else   
         flt.filters.push({ field: name, operator: "eq", value: value });  
     });  
     return flt;  
   }  

Hope this will helps you
Labels: ,
 
test