karthik parcha

karthik parcha

  • NA
  • 153
  • 93.1k

Subtring to retreive some text from the textbox

Dec 7 2011 2:44 AM
hi
i have to get the text entered in the textbox using substring function
Example:
the text Karthik-PVC is entered in the textbox
My code:
EmpName = txtProjEmployeeCode.Text.Substring(0, txtProjEmployeeCode.Text.LastIndexOf('-'));
output:karthik
i have to get only text after the '-'
how to write code for that using substring dynamically what ever the text i there after '-'i have to retreive
plz help me
thanks
karthik


Answers (2)