i have a List box with some texts , i wanna get all the strings after Other:
and this is the code i use
string[] causearr = lst_Box.Items[i].Value.Split('-');
SqlSrcComplainCgeAnalysis.InsertParameters["ID"].DefaultValue =causearr[0].ToString(); SqlSrcComplainCgeAnalysis.InsertParameters["subId"].DefaultValue = causearr[2].ToString();
if (txt_OtherCause.Text != string.Empty && txt_OtherCause.Visible == true && (int.Parse(causearr[2].ToString()) == 7 || int.Parse(causearr[2].ToString()) == 15 || int.Parse(causearr[2].ToString()) == 21))
SqlSrcComplainCgeAnalysis.InsertParameters["CauseComments"].DefaultValue = causearr[3].ToString().Substring(causearr[3].ToString().LastIndexOf(":") + 3);
else
SqlSrcComplainCgeAnalysis.InsertParameters["CauseComments"].DefaultValue = string.Empty;
and this is the data in the List Box
Cause:SpareParts-SubCause:Others: First Line
Cause:Technical-SubCause:Others: Second Line
so how to return the data after “Others:” if this data changes , and also the Cause changes according to the user selection .
you now need
lines[1]i guess