title: TextBox Date Validation
body: <p>I am using the following code for Short date validation.</p>
  
  <pre><code>DateTime dt = DateTime.Now;
  Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("fr-FR");
  if (DateTime.TryParse(textBox1.Text, out dt))
  { textBox1.Text = dt.ToShortDateString(); }
  </code></pre>
  
  <p>But there is a small Problem, If user enters 1/1/1 the output looks like 01/01/2001.</p>
  
  <p>if user enter 1-1-1 the output looks like 01/01/2001. Because of Format given by me.</p>
  
  <p>now what i want if user enter like 1-1-1 the output should be 01-01-2001.</p>