After my previous posts about returning data in JSON, I decided to have a go at returning a generic Datatable. This however is not as easy as simple returning a Datatable in your code behind method or web service. There a solution though and here it is.
If you break a Datatable down it is really only a List of Dictionary objects so that's how we'll approach this problem. This is compatible with .NET 2.0 and above, with the Ajax installed.
I'd like to acknowledge RichardD for the idea.
Click here to view the simple solution.
After my recent post on jQuery, JSON and dates in asp.net I decided that there must be a better solution so I set out writing my first jQuery plugin. And after a few hours I had it working to my delight.
It not only accepts a raw JSON object as input for method parameters, but safely parses and stringify's the object using Crockford's implementation (http://www.json.org/js.html). The syntax of the call doesn't change if it is a "POST" or a "GET" as it is all handled inside the plugin. It also returns Dates without a problem.
Click here to keep reading....
Schotime
Just recently I discovered jQuery and I have to say....I'm a huge fan already. So I decided to setup my first AJAX call through jQuery and call a page method. After some playing around I finally had it. Thanks also go out to www.encosia.com. Thanks Dave. The only problem was that I could not parse Dates.
So here I show you my solution which works pretty well and suits my needs. Maybe you might find it useful.
Click here to see my solution
Recently I have been experimenting with Sockets and trying to communicate with a windows service both with a console app and a website.
After managing to get some lines of communication going between the client and server applications, I couldn't help but notice that it was taking a little bit longer than it probably should have. I decided to have a closer look.
Click here to keep reading...
In a recent project I was attempting to list data from a configuration settings database table. The values were boolean but stored as a 'Y' or a 'N' so that only one set of SQL's was needed to be written, as the product supports both Oracle and SQL Server.
When I first put the GridView together, I was surprised to find that there was no Value property for the asp:checkbox nor could you bind any other column in a database but a 'bit' column to it.
The only solution I could come up with was to create a custom Checkbox and implement the feature.
Click here to keep reading and get the code...
In my previous Linq post I discussed using Linq with Regular expressions and how much less code was needed. In this post we'll again see how Linq can be used to speed up and simplify development.
There are many situations where you need to read data into memory or a database. Lets consider this scenario.
We have a tab delimited data file that has been exported from some web or windows application etc......
Click here to continue reading!
Have you ever tried to push ctrl+A on a multi-line or single line textbox in a Dot Net Windows Forms application to select all of the text? If you have you would know that it doesn't work. That's right, standard windows functionality doesn't work for the TextBox control. So here's how to fix it using a custom control.
Click here to read more..
With Linq now standard in .NET 3.5, there is no reason why we shouldn't use it. After all its full of features that can be used by any object that inherits the type IEnumberable. With such power at our fingertips, sorting, filtering, manipulation etc. etc. are available to us with fewer lines of code than previous needed.
One powerful feature of programing is Regular Expressions. These provide a concise and flexible means for identifying text of interest, such as particular characters, words, or patterns of characters. So whilst going over some old code of mine to extract data from a remote website, I decided to give the Regular Expression part of my code a face lift with Linq.
Click here to continue reading
More Posts