h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

Split File from a specified path in a C#.net

string DesignationPath = @"C:\\Documents and Settings\\Narayanan\\My Documents\\Others\\Txt)";
string[] Dir; Dir = Directory.GetFiles(C:\\Documents and Settings\\Narayanan\\My Documents\\Others\\Txt);
foreach (string str in Dir) { string[] GFiles = str.Split('\\'); string ExportPath =@"E:\" + "\\" + GFiles[6]; File.Copy(DesignationPath + "\\" + GFiles[6], ExportPath, true); }

Check TextBox value is in Email ID Format in C#.net

public  static  bool EmailAddressCheck(string emailAddress,int Mode)
        {
            bool functionReturnValue = false;
            if (Mode == 1)
            {
                string pattern = "^[a-zA-Z][\\w\\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\\w\\.-]*[a-zA-Z0-9]\\.[a-zA-Z][a-zA-Z\\.]*[a-zA-Z]$";
                Match emailAddressMatch = Regex.Match(emailAddress, pattern);
                if (emailAddressMatch.Success)
                {
                    functionReturnValue = true;
                }
                else
                {
                    functionReturnValue = false;
                    MessageBox.Show("This is not a Email Format");
                }
            }
            return functionReturnValue;
          
        }


How to disable future date in Datetimepicker

dateTimePicker1.MaxDate = DateTime.Now;
dateTimePicker1.CalendarForeColor = Color.LightGray;