How To Process JSON With C# and JQuery

| 2 Comments

JavaScript Object Notation affectionately known as JSON is a wonderful way to deliver content to the browser in a lightweight method that can both save on bandwidth and reduce page weight. Who doesn’t like the idea of performance improvements? In this tutorial, I will demonstrate how to make a call to a SQL Server database via a Web Method and create an employee object that will hold the top ten employees. This object will contain the JSON data that in turn will be displayed in a standard HTML table. Of course you could use CSS to display the data and reduce the need for a table. The first step is to create the Employee class that defines the fields, properties, and constructors. /// /// Summary description for Employee /// public class Employee { private string _firstName; private string _middleName; private string _lastName; public string FirstName { get { return _firstName; } set { _firstName = value; } } public string LastName { get { return _lastName; } set { _lastName = value; } } public string MiddleName { get { return _middleName; } set { _middleName = value; } } public Employee(string firstName, string middleName, string lastName) { _firstName = …

Continue reading

Professional Developer Conference (PDC) 2009

| 0 comments

Unfortunately I was not able to attend PDC2009 but I am keeping track with friends that I know who were as well I am keeping tabs on the speakers such as Scott Hanselman and Scott Davis,  via Twitter. Here are a number of topics that I find interesting and possibly you will also: Reactive Extions for .NET (Rx) ASP.NET MVC Beta 2 Windows Server AppFabric Windows Azure Tools and SDK Visual Studio .NET Functional Testing Open Data Protocol (OData) Be sure to visit Channel 9 and PDC2009 (which is streaming live) for further breaking news and for you folks in LA, keep the tweets a flowing. Update 18-NOV Microsoft Codename “Dallas” Microsoft Pinpoint Windows Identity Foundation Download Microsoft Sync Framework Power Pack for SQL Azure November CTP Download trials of Windows Server 2008 R2 and System Center Virtual Machine Manager 2008 R2 Details SharePoint 2010 Public Beta is now available for download Microsoft Silverlight Media Framework

Understanding SMTP Status Codes

| 0 comments

Many programmers take processing email as one of those actions that is easily implemented and rarely fails. If you have not read my earlier post How-to: Easily Sent Emails With .NET you want to review this example. One would greatly benefit from understanding the status code result from the attempt to process emails and the .NET framework provides the tools you need to successfully perform this exact task. The System.Net.Mail Namespace provides the SmtpStatusCode Enumeration which will provide a fine level of detail to the programmer thus allowing for better informed decisions. For example, assume that you have a requirement to notify an individual via email on a particular event such as a daily report. A common issue that I hear all too often from individuals that their mailbox is full and they could not receive my report. In this event I am going to provide logic to my application in which I can send the report to an alternate point of contact. This way your customer, boss, or who ever the end user gets the report and you come off looking like the hero. using System; using System.Collections.Generic; using System.Net.Mail; using System.Text; public class MyClass { public static void …

Continue reading

ASP.NET Tip: Creating and using a task list

| 0 comments

If you properly employ the Task List and comment your code appropriately you can ensure that you to complete the important tasks and never again miss something that you intended to correct. The Task List displays comments embedded in your project code that begin with the comment marker for your development language, followed by a default task token such as TODO, HACK, or UNDONE, or a custom comment token. To add a comment to the Task List it is as easy as completing two steps: Open a source code file for editing in the Code Editor. Begin a comment on a line of code you want to mark with your task. The out of the box task identifiers are TODO, HACK, and UNDONE. By default, the task window is not visible, in order to make this window viewable click View -> Other Windows ->Task List or the use the keyboard shortcut (Ctrl+Alt+K) and in Visual Studio 2008 it is (Ctrl+W+T). Note: Grab my Visual Studio .NET 2005 Keyboard Shortcuts document as a quick reference. If you want to add your very own custom keywords then go to Tools -> Options -> Environment -> Task List and you will be presented with a list of the default keywords. You can …

Continue reading