C# & VB.NET Coding Standards Guides

Clint Edmonson has released a some free C# and VB.NET Coding standards guides to the community to use.  For anyone who wants to download them they can be downloaded below

C# & VB.NET Coding Standards Guides

kick it on DotNetKicks.com

Posted on 12/26/2008 9:47:52 PM by admin

Permalink | Comments (0) | Post RSSRSS comment feed |

Categories: C# | VB.NET | Visual Studio | Programming

Tags: , , ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

New DotNetNuke Developers Help File

For developers new to programming modules within DNN there is a new tool available at codeplex. Ernst Peter Tamminga has spent several hours documenting the DotNetNuke core routines within the framework. The help files are generated using SandCastle and the SandCastle Help File Builder using the unmodified sources from DotNetNuke.

If you want to browse the help:
- Unzip DNNHelpSystem_CHM.zip into 1 .chm Help File to a local disk folder
- Double click the extracted .chm file.
- Now you can browse all help items MSDN style

The following is available for download:

Files

Documentation MSDN Style help file

documentation, 9947K

Documentation Readme

documentation, 3K

Source Code SFHB project

source code, 3K

Documentation Intellisense

documentation, 216K


kick it on DotNetKicks.com

Posted on 7/23/2008 9:52:06 PM by admin

Permalink | Comments (0) | Post RSSRSS comment feed |

Categories: DotNetNuke | Programming | Software | Visual Studio

Tags: , , ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Visual Studio 2008 Web Development Hot Fix Available

Microsoft has released a hot fix for Visual Studio 2008 and Visual Web Developer Express 2008 that fixes several issues with the HTML Editor within Visual Studio.

This fixes some of the following issues:

  • Source editor freezes for a few seconds when typing in a page with a custom control that has more than two levels of sub-properties.
  • “View Code” right-click context menu command takes a long time to appear with web application projects.
  • Visual Studio has very slow behavior when opening large HTML documents.
  • Visual Studio has responsiveness issues when working with big HTML files with certain markup.
  • The Tab/Shift-Tab (Indent/Un-indent) operation is slow with large HTML selections.

This fix can be downloaded from Microsoft here.

del.icio.us Tags:

Technorati Tags:

kick it on DotNetKicks.com

Posted on 2/10/2008 7:23:21 PM by admin

Permalink | Comments (0) | Post RSSRSS comment feed |

Categories: Visual Studio

Tags:

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

How to sort a DataTable

While working on one of my modules I had a request to be able to sort the items in my DataList alphabetically. This seemed to be a trivial thing as far as I was concerned so off I went.  I was using a DataTable to bind to the DataList control for viewing the links I was building.  So with a quick search on Google I came up with some sample code to give me the basics of what I wanted to accomplish.  So in the following I will present both a C# and VB version of the code for anyone to use in their applications.

VB.NET Version

   1:  Private Function AlphabeticSort(ByVal dtTable As DataTable, ByVal sortOrder As Integer) As DataTable
   2:      Dim dsSorted As New DataSet
   3:      Dim columnKey As String = "TabName"
   4:      Dim sortDirection As String = ""
   5:      Dim sortFormat As String = "{0} {1}"
   6:      Select Case sortOrder
   7:          Case 0
   8:              sortDirection = "ASC"
   9:          Case 1
  10:              sortDirection = "DESC"
  11:          Case Else
  12:              sortDirection = "ASC"
  13:      End Select
  14:      dtTable.DefaultView.Sort = String.Format(sortFormat, columnKey, sortDirection)
  15:      Return dtTable.DefaultView.Table
  16:  End Function

C# Version

   1:  private DataTable AlphabeticSort(DataTable dtTable, int sortOrder)
   2:  {
   3:      DataSet dsSorted = new DataSet();
   4:      string columnKey = "TabName";
   5:      string sortDirection = "";
   6:      string sortFormat = "{0} {1}";
   7:      switch(sortOrder)
   8:      {
   9:          case 0:
  10:              sortDirection = "ASC";
  11:              break;
  12:          case 1:
  13:              sortDirection = "DESC";
  14:              break;
  15:          default:
  16:              sortDirection = "ASC";
  17:              break;
  18:      }
  19:      dtTable.DefaultView.Sort = string.Format(sortFormat, columnKey, sortDirection);
  20:      return dtTable.DefaultView.Table;
  21:      }

As you can see the code is very familiar between the two.  This works excellent for doing an alphabetic sort and very fast as well.

Technorati Tags: , , ,

del.icio.us Tags: , , ,

kick it on DotNetKicks.com

Posted on 2/8/2008 4:50:12 PM by admin

Permalink | Comments (2) | Post RSSRSS comment feed |

Categories: ASP.NET | C# | Visual Studio | VB.NET

Tags: , , ,

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Using ASP.NET Validation for comparison to today's date

aspnetWhile working on a ski reservation system for one of my clients, Ski Broker.  I ran across the issue of needing to make sure that when a client registered they didn't set their registration into the past. I took a look through Google to see what I could find and found a few different samples of code to solve the issue.

What I finally ended up with is below:

   1:  <asp:TextBox id="txtDateNeeded" runat="server" />
   2:  <asp:comparevalidator id=valDateNeededCompare runat="server"  
   3:      Operator="GreaterThanEqual" type="Date" 
   4:      controltovalidate="txtDateNeeded" 
   5:      errormessage="The date must be greater than or equal to today." />

This places the necessary code on the page but does not allow the validation to take place yet because we do not have a comparison value yet.  In the code behind file we need to place the following code in the Page_Load event:

   1:  Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
   2:          valDateNeededCompare.ValueToCompare = DateTime.Now.ToShortDateString()
   3:  End Sub

Once we run the page now we will get the error message that we specified above in our validation control.  If anyone has any suggestions to make this code better please feel free to post it in the comments section below.


Posted on 1/9/2008 8:36:04 AM by admin

Permalink | Comments (0) | Post RSSRSS comment feed |

Categories: ASP.NET | Programming | Software | Visual Studio

Tags: , , ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

ASP.NET Dynamic Data Support in ASP.NET 3.5 CTP

With the release of the first CTP preview of the "ASP.NET 3.5 Extensions" which included the following features:

  • ASP.NET AJAX improvements
    • New additions include support for managing browser history.
  • ADO.NET Entity Framework
    • New modeling framework to better model real world view of information.
  • ASP.NET Dynamic Data
    • Build a fully customizable, data-driven web site app quickly.
  • ADO.NET Data Services
    • Provides new services to find, manipulate and deliver data with simply URI's.
  • ASP.NET MVC
    • MVC (Model, View, Controller) design pattern for the existing 3.5 runtime
  • Silverlight Controls for ASP.NET
    • Provides new Silverlight controls for use within ASP.NET

Now Scott Guthrie has written a great article on his blog on the ASP.NET Dynamic Data component for the CTP.  This feature looks like a great way to get an administration section for a web site up and running really quickly and let you start modifying it to suit your needs once it's complete.  I'm sure I'll use this feature in the future.

del.icio.us Tags: , , ,

Technorati Tags: , , ,

Posted on 1/6/2008 12:17:25 PM by admin

Permalink | Comments (0) | Post RSSRSS comment feed |

Categories: ASP.NET | C# | Software | Visual Studio

Tags: , , ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Switching to BlogEngine.net

benlogo80 Having played with several blogging engines over the last few years and having experience in .NET programming since 2000.  I decided to take a look at BlogEngine.net.  I've previously worked with blogs based on .Text, dasBlog and Community Server and they all were interesting and worked well. I was just not crazy about the upgrading of some of these other engines.

Plus as a developer I always like to get under the covers of what is going on in the code to get a good understanding of what the software is doing. Well while browsing http://www.asp.net/ and taking a look at the starter kits, I saw the BlogEngine.net project there.  I proceeded to take a look at the project site for the starter kit and then took a look at the project site on CodePlex.  I then decided to give it a try.

A few years ago I had started work on creating a community site here at Learn MS NET and it didn't pan out quite like I wanted so I had basically mothballed the domain.  I had also been playing around with blog engines at a URL for my business http://blog.shancer.com/ which I had written a few articles for.  So I made the decision in early December to combine both my mothballed site's content which only had a few articles of interest and relevance and the blog posts from my business blog.

Which has led me to using BlogEngine.net and currently working with the latest build from last night at this point.  I ported all my content from dasBlog which was the blogging engine I was using with BlogML.  It took some playing around to get it complete but it worked fantastically for pulling that content in.  I then took and renamed my old community web site and proceeded to copy all the articles out and place on this new site.

Now that i'm becoming familiar with how the source works for BlogEngine.net I will be developing some extensions and helping improve some of the extensions that are already available.  Look for more on this in the future.


Posted on 1/6/2008 11:24:58 AM by admin

Permalink | Comments (0) | Post RSSRSS comment feed |

Categories: ASP.NET | BlogEngine.NET | C# | Personal | Software | Visual Studio

Tags: , , , , ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Under the Hood: ASP.NET 3.5's Web.config file

Scott Mitchell has written an excellent article on the differences between the 3.5 and 2.0 versions of ASP.NET's Web.config file.  The information he describes is great and gives a much better understanding of what is going on in the configuration of the application in the initial creation of an ASP.NET application.

The article can be read here:

Dissecting ASP.NET Version 3.5's Web.config File

Technorati Tags: , , ,

del.icio.us Tags: , , ,

Posted on 1/1/2008 8:47:02 PM by admin

Permalink | Comments (0) | Post RSSRSS comment feed |

Categories: ASP.NET | C# | Software | Visual Studio

Tags: , , ,

Currently rated 2.0 by 1 people

  • Currently 2/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Spell Checker Add-in for Visual Studio 2008 & 2005

Found this great looking add-in from a Microsoft employee Mikhail Arkhipov that allows you to do Spell Check within your code in Visual Studio 2008.  For anyone that does a lot of web development or just wanting to be able to do a spell check of your comments this would be a great add-in to have.

He provides two versions of the add-in.  One for Visual Studio 2005 and one for Visual Studio 2008 so that it is not necessary to be running the latest version to have this add-in.  I see that it is at version 2.1 complete with some bug fixes and updates since the initial release of about a week ago.

Spell Checker Add-in for Visual Studio

del.icio.us Tags: ,

Technorati Tags: ,

Posted on 1/1/2008 7:37:38 PM by admin

Permalink | Comments (0) | Post RSSRSS comment feed |

Categories: Software | Visual Studio

Tags: ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Visual Studio 2008 and .NET 3.5 Training Kit available

While looking through my RSS Feed I ran across Randy Walker's blog post about the Visual Studio 2008 and .NET 3.5 Training Kit being available. I thought it would be a good link to provide to everyone who reads my blog as well as placing it here as a reminder for me to download and take a good look at it.

OverView

The Visual Studio 2008 and .NET Framework 3.5 Training Kit includes presentations, hands-on labs, and demos. This content is designed to help you learn how to utilize the Visual Studio 2008 features and a variety of framework technologies including: LINQ, C# 3.0, Visual Basic 9, WCF, WF, WPF, ASP.NET AJAX, VSTO, CardSpace, SilverLight, Mobile and Application Lifecycle Management.

The Kit can be downloaded at Microsoft here.

Technorati Tags: , ,

del.icio.us Tags: , ,

Posted on 1/1/2008 1:18:27 PM by admin

Permalink | Comments (0) | Post RSSRSS comment feed |

Categories: ASP.NET | C# | Software | Visual Studio

Tags: , , ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5