Home / Archive by category 'Programming'

| RSS

Mother Of All SharePoint 2010 Virtual Machines

This is one Machine to rule them all (I know Lord of Rings is so old school). In the Virtual Machine you will get the following.

Windows Server 2008 R2 Standard Evaluation Edition x64, running as an Active Directory Domain Controller for the “CONTOSO.COM” domain with DNS and WINS
Microsoft SQL Server 2008 R2 Enterprise [...]

[ More ] May 10th, 2010 | No Comments | Posted in Programming |

Working With Client ID In ASP.NET 4

ASP.NET 4 allows developers to customize Client Id which gets generated by ASP.NET. Up until now Client Id generated by ASP.NET has been ummm just plain ugly. Other than aesthetics they are also hard to work with in client side scripts. ASP.NET solves this issue to a degree by providing ClientIDMode property. In this post [...]

[ More ] October 30th, 2009 | 13 Comments | Posted in Programming |

Create Breakpoints With Hit Count In Visual Studio 2008

This post shows you how to use Breakpoints in Visual Studio with a hit count. Breakpoints can be described as bread and butter of debugging. They allow you to stop execution at any statement in your code. By doing this you can examine values in your variables, look at call stack, change values in variables [...]

[ More ] October 2nd, 2009 | 2 Comments | Posted in Programming, Tips |

Output DOCTYPE In XSLT

These days I am working on a personal project which I call “my precious”. This projects involves transforming XML documents into HTML using XSLT. Things were going smooth till I decided to output DOCTYPE from XSLT. This is what I did.
  
XSLT parser does not like the code above and gives me this error.

After [...]

[ More ] September 16th, 2009 | 2 Comments | Posted in Programming |

Output To Console In Windows Forms Application

This post shows you how to output data to a Console in a Windows Forms Application. I use this technique religiously when developing Windows Forms applications. Debugging is much simpler when you can see information on what your application is doing in a Console. Of course the onus is on you as developer to output [...]

[ More ] September 1st, 2009 | 6 Comments | Posted in Programming |

ADO.NET Data Services Logical Operators

In this post we will look at Logical Operators in ADO.NET Data Services. These operators can be used as filter expressions in our requests and ADO.NET Data Services applies the filter before results are returned. We will use Data Services generated over Adventureworks Lite database. If you are new to ADO.NET Data Services and would [...]

[ More ] August 26th, 2009 | No Comments | Posted in Programming |

Execute Stored Procedure With ADO.NET Data Services

Introduction
In an earlier article I looked at how DO.NET Data Services can be used with ASP.NET. In this post I will talk about using ADO.NET Data Services to retrieve data via SQL Server stored procedure. Doing this is simple and I will follow a similar approach to hook everything up as I did in my [...]

[ More ] August 16th, 2009 | 8 Comments | Posted in Programming |

ADO.NET Data Services With ASP.NET

Introduction
In this tutorial we will look at how ADO.NET Data Services can be used to create services which are consumed by ASP.NET client. We will use Adventure works Lite database as an example to demonstrate the concepts. Code for this article can be downloaded at the bottom of the article.
ADO.NET Data Services as the name [...]

[ More ] July 28th, 2009 | 12 Comments | Posted in Programming |

Get URI Of Silverlight Plugin Host Page

Within our Silverlight application if we want to know the URI where our Silverlight content is running, we can tap into System.Windows.Browser namespace. This namespace contains object which are full of Browser related information. This is an example of retrieving the URI from within Silverlight application.
<StackPanel x:Name="LayoutRoot" Margin="10">
<TextBlock Text="Your URL is: " />
[...]

[ More ] July 13th, 2009 | No Comments | Posted in Programming |

Silverlight 3 Element To Element Binding

Silverlight 3 among its other features includes element to element binding. This was always available in WPF but somehow missing in Silverlight 1 and 2. And now Silverlight 3 has bridged that gap. Element to element binding can reduce code when used properly. In this post I will show you how to use this feature.
Example
In [...]

[ More ] July 12th, 2009 | No Comments | Posted in Programming |

Get Browser Information In Silverlight

While writing Silverlight you may come across a need to get information about host browsers within your application. In Silverlight this information is exposed by BrowserInformation class within System.Windows.Browser namespace. BrowserInformation can be accessed through HtmlPage class which also lives in System.Windows.Browser namespace. Here is an example where I am retrieving information about the browser.
<StackPanel [...]

[ More ] July 9th, 2009 | 1 Comment | Posted in Programming |

Insert Master Detail Data With LINQ To SQL

Best thing about running One .Net Way is interaction with members of developer community. I thoroughly enjoy answering questions which come my way through this site. Early in the morning today I saw a question by Joey. To avoid loosing details in paraphrasing, here is the exact question asked by Joey.
I’m new to LINQ. If [...]

[ More ] July 8th, 2009 | 8 Comments | Posted in Programming |