Feeds:
Posts
Comments

Archive for the ‘Archive’ Category

Dear visitor,

Thanks to visit my Blog.

To see my latest blog posts please go to that link http://ashrafur.wordpress.com

Read Full Post »

guideline for programmer

http://www.pragmaticprogrammer.com/ppbook/extracts/rule_list.html

Read Full Post »

IsDate in ASP.NET

public static bool IsDate(Object obj)
{
        string strDate = obj.ToString();
        try
        {
            DateTime dt = DateTime.Parse(strDate);
            if((dt.Month!=System.DateTime.Now.Month) || (dt.Day<1&&dt.Day>31) || dt.Year!=System.DateTime.Now.Year)
                return false;
            else
                return true;
       }
       catch
       {
            return false;
       }
}

Read Full Post »

IsNumeric in ASP.NET

public static bool IsNumeric(object value)
{
        try
        {
            int i = Convert.ToInt32(value.ToString());
            return true;
        }
        catch (FormatException)   
        {
            return false;
        }
}

Read Full Post »

isGuid in ASP.NET

static bool isGuid(string guid)
{
bool isValid = false;
Regex re = new Regex(@”^(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\- [0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\- [0-9a-fA-F]{12}(\}){0,1}$”, RegexOptions.IgnoreCase);
if (re.IsMatch(guid))
{
isValid = true;
}
return isValid;
}

Read Full Post »

take a enum testEnum and a DropDownList ddlEnumData
public enum testEnum
{
one=1, two=2, three=3
}

foreach(testEnum te in Enum.GetValues(typeof(testEnum)))
{
  ddlEnumData.Items.Add(new ListItem(te.ToString(), Convert.ToInt32(te).ToString()));
}

Read Full Post »

This errors may appear when you are debugging , here are the how you will solve it

1. In the Internet Explorer, go to “Tools” -> “Internet Options”.

2. Switch to “Security” Tab.

3. Click on “Internet” (The Globe Icon. Its actually the default selected).

4. Click on “Custom Level” in the bottom.

5. Scroll down to find the “User Authentication” section.

6. Select “Automatic logon with current username and password”.

7. Click “Ok” twice to exit.

reference: http://geekswithblogs.net/ranganh/archive/2005/12/30/64446.aspx

Read Full Post »

Older Posts »