SQL Server 2008 R2 only Service Pack 1

Filed in SQL Leave a comment

Alternatively with the windows updates you can update your plain R2

Related Link

Getting string value from Enum

Filed in .Net Leave a comment

Nice article :http://blog.waynehartman.com/articles/84.aspx

public class EnumUtils

{

public static string stringValueOf(Enum value)

{

FieldInfo fi = value.GetType().GetField(value.ToString());

DescriptionAttribute[] attributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false);

if (attributes.Length > 0)

{

return attributes[0].Description;

}

else

{

return value.ToString();

}

}

public static object enumValueOf(string value, Type enumType)

{

string[] names = Enum.GetNames(enumType);

foreach (string name in names)

{

if (stringValueOf((Enum)Enum.Parse(enumType, name)).Equals(value))

{

return Enum.Parse(enumType, name);

}

}

throw new ArgumentException(“The string is not a description or value of the specified enum.”);

}

}

———————————————–

public enum ShippingOptions

{

[DescriptionAttribute("2nd Day Air")]

SecondDayAir = 01,

[DescriptionAttribute("Next Day Air")]

NextDayAir = 02,

Ground = 03

}

————————————————

EnumUtils.stringValueOf(Enums.ShippingOptions SecondDayAir)

Answer is : 2nd Day Air

crystal report in VS 2010 not showing report in production environment

Filed in .Net Leave a comment

Copy C:\inetpub\wwwroot\aspnet_client on your website root

Main buy cialis tabs folder is C:\inetpub\wwwroot\aspnet_client\system_web

Getting Key value from web.config asp.net

Filed in .Net Leave a comment

System.Configuration.ConfigurationManager.AppSettings["MinOrderAmtForFreeShipping"])

How to assign a nullable parameter into not nullable

Filed in .Net Leave a comment

The profile paramerter is defined nullable whereas my method GetAddressesByAId must require an integer.

objBillAddresses = objCustomerProxy.GetAddressesByAId(Profile.BillIdCheckOut.GetValueOrDefault(0));

Defining a Nullable type parameter in Profile.config/Web.config

Filed in .Net Leave a comment

<add name = “ShipIdCheckOut” type=”System.Nullable`1[System.Int32]” allowAnonymous=”true”/>

TOP