I have following values:
<H2:H2LabelComboBoxCell ID="LabelComboboxCellProject" SecurityID="CD4D3959-0ADB-4375-8DCF-917157528BDE" MaxLength=100/>
<H2:H2LabelFileListCell ID="LabelFileListCellApplicationAttachched" ColumnSpan="1" DataSource="ClientFileH2BindingSource" />
<H2:H2LabelTextBoxCell LabelText="Budget (€)" ColumnSpan="1" ID="LabelTextboxCellBudget" />
<H2W:H2CheckBoxList ID= "H2CheckBoxListReasonForRejection" DataIsDefaultMember="IsDefault" runat="server" />
I need to get value of ID in each row.
I thought of use substring as follows:
string line= @"<H2:H2LabelComboBoxCell ID="LabelComboboxCellProject" SecurityID="CD4D3959-0ADB-4375-8DCF-917157528BDE"/>"
string id= line.Substring(line.IndexOf("ID="),xyz);
How can i get the value of ID ( value i can use for xyz)
EDIT :
I tried this with XmlDocument
as Foolows:
string text= " <H2H2LabelTextBoxCell ID="H2LabelTextBoxCell1" runat="server" TextSize=400 PlaceHolder="" LabelText="Translate into" Token="Translation_Into_For_Language_management_Initial" DataSource="SelectedTokensForStaticListTypeBindingSource2" DataMember="Value" Disabled="False" SecurityID="755C974E-211A-4832-B5E2-F3765194E6BC"></H2H2LabelTextBoxCell> "
XmlDocument doc = new XmlDocument();
doc.LoadXml(text);
this throws following exception : '400' is an unexpected token. The expected token is '"' or '''. Line 1, position 72.
Due to formatting issues i move back to normal line reading option.