0

your boss name after finish b tag Want received random generated name so we need this name in our textbox or list box area.

Actually every loading time we see your boss name after coming new name so we just received name in our textbox area or list box are.

Please help me how I am received name data in my list box or textbox Please.

 
       
         Your boss name  adriana
         your id: 2241
         Email: [email protected]
         File Format: officeial
       
       

 
       
         Your boss name  jennefer
         your id: 2241
         Email: [email protected]
         File Format: officeial
       
       

my code 

HtmlElementCollection bColl = webBrowser1.Document.GetElementsByTagName("td");
        foreach (HtmlElement bEl in bColl)
        {
            if (bEl.GetAttribute("b").Contains("your"))
            txtLinkDetails.Text = bEl.OuterHtml.Split('"')[3].Replace("&amp", "&");
        }
2
  • what is your input output? Commented Aug 29, 2015 at 10:25
  • <table> <tbody><tr><td><b>Your boss name </b> jennefer</td></tr> <tr><td><b>your id:</b> 2241</td></tr> <tr><td><b>Email:</b> [email protected]</td></tr> <tr><td><b>File Format:</b> officeial</td></tr> </tbody></table> </td> Commented Aug 29, 2015 at 11:58

1 Answer 1

2

Try this: at first you find innerhtml of table then filter by <b>([^<]+)<\/b>([^<]+) regex

Demo

And you will get following output with array group:

//example
//group 1 =Your boss name
// group 2= jennefer

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.