I want to get the substring from a string when i ll give the part of the string …
For example : I have the string “Casual Leave:12-Medical Leave :13-Annual Leave :03”.
Partial code is here:
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 //
}
what i do?
See the below code