To clear sorting setting in kendo grid reset sort array with blank object .
var grid = $("#UsersGrid" );
if (grid.data("kendoGrid" ).dataSource != null) {
if (grid.data("kendoGrid" ).dataSource._sort != null && grid.data("kendoGrid" ).dataSource._sort != undefined)
{
grid.data("kendoGrid" ).dataSource._sort[0] = {};
}
}
Search This Blog
Tuesday, December 27, 2016
Thursday, December 15, 2016
How to generate proxy class from WCF/ASMX using svcutil?
Generate proxy class for WCF
svcutil http://localhost/MyService/ClassName.svc /Language=c# /t:Code /out:ClassNameProxy.cs /config:ClassNameProxy.config
Generate proxy class for ASMX web service
svcutil http://localhost/MyService/ClassName.asmx /Language=c# /t:Code /out:ClassNameProxy.cs /config:ClassNameProxy.config
Note: This command line use runtime serializer by default. To use other serializer like xml serializer user /serializer: attribute in command line as below-
SvcUtil.exe http://localhost/MyService/ClassName.asmx /serializer:XmlSerializer /out:"d:Projects\ClassNameProxy.cs" /config:"d:\projects\ClassNameProxy.config"
svcutil http://localhost/MyService/ClassName.svc /Language=c# /t:Code /out:ClassNameProxy.cs /config:ClassNameProxy.config
Generate proxy class for ASMX web service
svcutil http://localhost/MyService/ClassName.asmx /Language=c# /t:Code /out:ClassNameProxy.cs /config:ClassNameProxy.config
Note: This command line use runtime serializer by default. To use other serializer like xml serializer user /serializer: attribute in command line as below-
SvcUtil.exe http://localhost/MyService/ClassName.asmx /serializer:XmlSerializer /out:"d:Projects\ClassNameProxy.cs" /config:"d:\projects\ClassNameProxy.config"
Thursday, June 30, 2016
Monday, June 13, 2016
How to enable PUT and DELETE http methods in Web API?
Add below setting in web.config inside <system.webServer> tag to enable PUT and DELETE HTTP methods in web api.
<modules runAllManagedModulesForAllRequests="true">
<remove name="WebDAVModule"/>
</modules>
<modules runAllManagedModulesForAllRequests="true">
<remove name="WebDAVModule"/>
</modules>
Thursday, March 10, 2016
How to call WCF service from classic ASP
DIM xmlhttp, response, objRequest, txtRequest, test
DIM url : url = "http://www.example.com/Services/Service1.svc"
txtRequest = "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">" & _
"<soapenv:Header/>" & _
"<soapenv:Body>" & _
"<tem:GetVehicleStatus>" & _
"<tem:OrgId>111</tem:OrgId>" & _
"<tem:VehicleId>555</tem:VehicleId>" & _
"</tem:GetVehicleStatus>" & _
"</soapenv:Body>" & _
"</soapenv:Envelope>"
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
'xmlhttp.setOption 2, 13056 'ignore certificate errors for development machines
xmlhttp.open "POST", url, false
xmlhttp.setRequestHeader "Content-Type", "text/xml;charset=UTF-8"
xmlhttp.setRequestHeader "SOAPAction", "http://tempuri.org/Services/GetVehicleStatus"
xmlhttp.send txtRequest
response = xmlhttp.responseText
Response.Write (xmlhttp.status& ":::"& xmlhttp.statusText) & "response:::"& response
DIM url : url = "http://www.example.com/Services/Service1.svc"
txtRequest = "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:tem=""http://tempuri.org/"">" & _
"<soapenv:Header/>" & _
"<soapenv:Body>" & _
"<tem:GetVehicleStatus>" & _
"<tem:OrgId>111</tem:OrgId>" & _
"<tem:VehicleId>555</tem:VehicleId>" & _
"</tem:GetVehicleStatus>" & _
"</soapenv:Body>" & _
"</soapenv:Envelope>"
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
'xmlhttp.setOption 2, 13056 'ignore certificate errors for development machines
xmlhttp.open "POST", url, false
xmlhttp.setRequestHeader "Content-Type", "text/xml;charset=UTF-8"
xmlhttp.setRequestHeader "SOAPAction", "http://tempuri.org/Services/GetVehicleStatus"
xmlhttp.send txtRequest
response = xmlhttp.responseText
Response.Write (xmlhttp.status& ":::"& xmlhttp.statusText) & "response:::"& response
Subscribe to:
Posts (Atom)