473,395 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Split from webpage-html [C#]

I managed this in vb.Net, but I can't make it work in C#..!

Expand|Select|Wrap|Line Numbers
  1. Label1.Text = Split(Split(WebBrowser1.Document.Body.InnerHtml, "<b>")(1), "</b>")(0)
Can anywon translate this to C# code, plz?

Thanks
Kartoffelen
Feb 10 '08 #1
4 2076
djn486
1
I managed this in vb.Net, but I can't make it work in C#..!

Expand|Select|Wrap|Line Numbers
  1. Label1.Text = Split(Split(WebBrowser1.Document.Body.InnerHtml, "<b>")(1), "</b>")(0)
Can anywon translate this to C# code, plz?

Thanks
Kartoffelen
Try this format.

WebBrowser1.Document.Body.InnerHtml.ToString().Spl it(@"<b>").Split(@"</b>")
Feb 10 '08 #2
It didn't work..

"The best overloaded method match for 'string.Split(params char[])' has some invalid arguments"
Feb 11 '08 #3
Plater
7,872 Expert 4TB
You want whatever is comming between the <b></<b> tags right?
Split() is not really useful for this since it splits on a per-character basis.
I would recomend a few IndexOf() and Substring() calls.
Feb 11 '08 #4
You want whatever is comming between the <b></<b> tags right?
Split() is not really useful for this since it splits on a per-character basis.
I would recomend a few IndexOf() and Substring() calls.
Ok, I will try that..
Feb 11 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: GeneSZ | last post by:
If you are IE user, you can get your HTML source by click View|Souece. I want to convert this HTML file into PDF file in my server site. The first thing I must do is to get this HTML in my variable...
4
by: walterbyrd | last post by:
Let's suppose I have dozens, or hundreds of JPGs. I want to put them in photo album sort of format. With thumbnail and all. Do I have to specically spell out the full name of each file? Or is there...
7
by: kapdan01 | last post by:
Greetings, I am presently trying to display chinese characters on a webpage (HTML). I have tried changing the charset to big5, UTF-8 to no avail. Word documents display correctly, as does...
2
by: CM | last post by:
Hi, Could anyone please help me? I am completing my Master's Degree and need to reproduce a Webpage in Word. Aspects of the page are lost and some of the text goes. I would really appreciate it....
10
by: vunet.us | last post by:
Hello, I use XMLHTTP to get an HTML of another page. Then, I need to cut some middle part of that HTML string but I have problems doing it (see note in caps below). The error I have generated at...
0
by: Seven_Ever | last post by:
Hi, Situation is: - I have a set of small webpages (in simple html format) I'd like to display in a ListView. All of them are the same size. I though about creating a custom ListView control...
4
by: Dragon XR | last post by:
hi all im having troubles with a form that i have created for my website (application form) basically i need to keep the webpage, page-break settings transfered into an email. ive used the wc3...
5
by: ineuw | last post by:
I am thinking of encrypting my web pages. Any input, opinion, experience, recommendations and pros and cons will be much appreciated. ineuw
1
by: Sami | last post by:
What's the best way to split <li>item 1</li><li>item 2</li><li>item 3</li> into a List<string> or is my only option to use the xml reader? thx
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.