Thursday, December 2, 2010

Client Side Sortable Gridview with JQuery

It is fantastic to be able to sort the asp.net gridview on client side using jquery. I am going to make an example.

Friday, November 19, 2010

Simulate disable or readonly textbox with no focus

if we make the textbox disabled="true" then its value does not post back to the server and if we make it readonly="true" then it depends on browser to post back the value or not but any value change we make on client side, will be lost on the server side.

Wednesday, November 10, 2010

WCF Data Services with Custom Data Source and Reflection Data Service Provider

I am going to show an example how to expose custom data source using wcf data services and OData. This is just a simple test.

Tuesday, November 2, 2010

HMAC MD5 in Flex and .Net

Regarding to my previous post, HMAC is a message authentication code (MAC) and can be used to verify the integrity and authentication of a message. I was trying to consume WCF Rest services from Flex.

Saturday, October 16, 2010

Sending multiple values in XML to database from application and parse using XQuery in SQL Server 2005

SQL Server 2005 has XML support, it means we can process XML on database side. There are some scenarios that we want to insert, update or delete multiple rows or send some different values to the database, one way is using delimited values and then on database side, we have to parse that string to retrieve the values, another way is using XML to send data to database, then in the stored procedure we can use XQuery and easily parse that XML.(the names are all case sensitive)

Friday, October 15, 2010

Digital Signature in REST Services to maintain the integrity of sensitive data in URI

When we think about REST web service, we all have heard this recommendation that we had better keep the application state on the client side, if the data regarding to the application state is not that large, then we can put that data in the URI, if you decide to do that to manage the state, then you need to have some kind of checking to make sure that state data has not been tampered. one option is using digital signature.

Thursday, September 23, 2010

How to parse large XML files efficiently using LINQ

Sometimes we want to parse a very large xml file and populate our custom objects and we need to do it efficiently, because the file is so large, we dont want to load the whole file in memory, using XmlReader looks good but needs a lot of coding and we have to take care of every details when parsing.

Tuesday, September 21, 2010

How to measure the time the method takes to run in C#

.Net framework provides StopWatch class in (System.Diagnostics.StopWatch). we can use this class to measure the time for a method takes to finish executing.