studio NETSOULS

Applying Web To Your Business

It’s a good idea for all the assemblies in a single solution to have the same version number, but the default in Visual Studio is for each project to have it’s own AssemblyInfo.cs file, each with it’s own version number. However it’s easy to share a single Version.cs file between all the projects.More...


The current article is taken from http://blog.telerik.com

In some scenarios it is useful to encode and decode the URI. For example:

To avoid unexpected requests to the server, you should call encodeURIComponent on any user-entered parameters that will be passed as part of a URI. For example, a user could type "Thyme &time=again" for a variable comment. Not using encodeURIComponent on this variable will give comment=Thyme%20&time=again. Note that the ampersand and the equal sign mark a new key and value pair. So instead of having a POST comment key equal to "Thyme &time=again", you have two POST keys, one equal to "Thyme " and another (time) equal to again. More...


Collection Helper

If you've worked on creating a Data Access Layer you know how frustrating it can be to determine the type of data your DAL will be handling. For that reason, creating a converter that works with generics or vica-versa can be the long term answer.

Alright, so for our applications we have a couple of forms that use the DataGridView control to display tabular data (kinda of a common scenario for many business applications). The data is returned from our services as an IList<T> in which we can just then bind directly to the grid by using the grid's DataSource property. Pretty easy task...unless when it comes to data manipulations.

So, what we decided to was take the easy way out and that is convert our IList&lt;T&gt; to a DataTable object with the correct schema (for the primitive types) that our contained objects have.&nbsp; Here's what we came up with: More...


I lot of times in our Business Object Model we use enums, these enum property could be a string, integer or a short value. While retrieving records from the database we need to set the property in the BOM to that of the enum value.

Here is one of those methods that you can never find when you're looking for it

// suppose we have a enum   
enum PublishingStatus : short   
{   
    Draft = 1,   
    PendingApproval = 2,
    Active = 3,   
    Archived = 4,   
    PendingDeletion = 5   
}  

//set a default value  
PublishingStatusEnum CurrentPublishingStatus = 
    PublishingStatusEnum.Draft;  
if (Enum.IsDefined(typeof(PublishingStatusEnum), 
    Helper.GetShort(Reader["CurrentPublishingStatusId"])))  
    CurrentPublishingStatus = (PublishingStatusEnum)Enum.Parse(
        typeof(PublishingStatusEnum), 
        Reader["CurrentPublishingStatusId"].ToString());  

// suppose we have a string enum  
enum SiteColors  
{  
    Red,  
    Blue,  
    Orange  
}  

//set a default value, pass the last variable as true of ignoreCase
SiteColors SelectedColor = SiteColors.Red;  
if (Enum.IsDefined(typeof(SiteColors), 
    Reader["SiteColor"].ToString()))  
    SelectedColor = (SiteColors)Enum.Parse(
        typeof(SiteColors), Reader["SiteColor"].ToString(),true); 

First off, the code-behind model has changed. In the @Page directive, accessing your code behind is accomplish via the CodeFile attribute instead of the Code behind or Src attribute. Also much of the used to DataGrid properties have changed, as seen below: More...


Below is a table of the most common client side events in JavaScript. The Table is divided into three columns - the first lists the name of the event. The second contains a short description of the event, and the third lists all page objects, which support the given event. More...


Recent Project Snapshots

  • Mary Kay - Make Over Contest
  • Utility Forms
  • Oncomed
  • Nutrition Vista
  • Forysth Barr - Letter Writer Application
  • Phase One Trials - Content Management System

About Us

studio NETSOULS is a complete IT services company, offering strategy, design, development and implementation of the total solution for your web and IT initiatives. The solutions we provide, enables businesses to leverage leading edge technology to gain sustainable competitive advantages in today's marketplace.

We specialize in designing, developing and deploying the next generation of IT solutions including e-business solutions Read more...

Month List