Get substring from a string
<p>I want to get the substring from a string when i ll give the part of the string ...</p>

<p>For example : I have the string "Casual Leave:12-Medical Leave :13-Annual Leave :03".</p>

<p>Partial code is here: </p>

<pre><code>      Label label1 = new Label();
      label1.Text = (Label)item.FindControl(Label1); //label1.Text may be casual Leave or medical leave or others...
      if (label1.Text == substring(the given string ))
      {
          //suppose label1.Text ="Casual Leave" means i put 12 into the textbox
          TextBox textbox = new TextBox();
          textbox.Text= //corresponding casual leave value //
      }
</code></pre>

<p>what i do?</p>
