Click here to Skip to main content
16,021,810 members
Home / Discussions / C#
   

C#

 
QuestionHow to set TextBox to only accept numbers? Pin
naouf1021-Nov-15 7:34
naouf1021-Nov-15 7:34 
AnswerRe: How to set TextBox to only accept numbers? Pin
Gerry Schmitz21-Nov-15 11:38
mveGerry Schmitz21-Nov-15 11:38 
AnswerRe: How to set TextBox to only accept numbers? Pin
Gilbert Consellado21-Nov-15 16:25
professionalGilbert Consellado21-Nov-15 16:25 
AnswerRe: How to set TextBox to only accept numbers? Pin
BillWoodruff21-Nov-15 18:43
professionalBillWoodruff21-Nov-15 18:43 
QuestionHow to replace text in this situation? Pin
turbosupramk320-Nov-15 7:24
turbosupramk320-Nov-15 7:24 
AnswerRe: How to replace text in this situation? Pin
Gerry Schmitz20-Nov-15 8:07
mveGerry Schmitz20-Nov-15 8:07 
AnswerRe: How to replace text in this situation? Pin
Matt T Heffron20-Nov-15 8:47
professionalMatt T Heffron20-Nov-15 8:47 
QuestionGet row from AngleSharp.Dom.Html.HtmlSpanElement Pin
Member 1215521920-Nov-15 1:12
Member 1215521920-Nov-15 1:12 
Hello everyone.

I'm currently trying to get into htmls and as a start wanted to create a program which reads the current Artist and song out of a Webradio.

So far i can read out an Artist and song but it's not the current one but the last one in the list on the site...could anyone help me getting the current one? That'd be great. Smile | :)

Here is my Code so far:
C#
using (WebClient client = new WebClient()) 
            {

                string htmlCode = client.DownloadString("http://www.planetradio.de/music/trackfinder.html");
                
                var parser = new HtmlParser();
                var document = parser.Parse(htmlCode);
                
                
                var hitfinderTable = document.All.Where(m => m.Id == "hitfindertable").First() as AngleSharp.Dom.Html.IHtmlTableElement;

                foreach (var row in hitfinderTable.Rows)
                {
                    var artistName = row.Cells[2].TextContent;
                    var songName = row.Cells[3].TextContent;
                    
                    label.Content = artistName + " " + songName;
                    
                }
            }


Thanks to everyone in advance.
AnswerRe: Get row from AngleSharp.Dom.Html.HtmlSpanElement Pin
Gerry Schmitz20-Nov-15 5:09
mveGerry Schmitz20-Nov-15 5:09 
QuestionGetting ASCII value for Characters? Pin
murali_utr19-Nov-15 22:15
murali_utr19-Nov-15 22:15 
AnswerRe: Getting ASCII value for Characters? Pin
BillWoodruff19-Nov-15 22:49
professionalBillWoodruff19-Nov-15 22:49 
GeneralRe: Getting ASCII value for Characters? Pin
murali_utr20-Nov-15 1:33
murali_utr20-Nov-15 1:33 
GeneralRe: Getting ASCII value for Characters? Pin
Member 1215521920-Nov-15 1:46
Member 1215521920-Nov-15 1:46 
GeneralRe: Getting ASCII value for Characters? Pin
murali_utr20-Nov-15 2:38
murali_utr20-Nov-15 2:38 
GeneralRe: Getting ASCII value for Characters? Pin
Richard MacCutchan20-Nov-15 3:07
mveRichard MacCutchan20-Nov-15 3:07 
GeneralRe: Getting ASCII value for Characters? Pin
OriginalGriff20-Nov-15 2:49
mveOriginalGriff20-Nov-15 2:49 
AnswerRe: Getting ASCII value for Characters? Pin
Richard MacCutchan19-Nov-15 23:20
mveRichard MacCutchan19-Nov-15 23:20 
QuestionLeap Motion Integration problem Pin
Alpa2419-Nov-15 14:44
Alpa2419-Nov-15 14:44 
AnswerRe: Leap Motion Integration problem Pin
OriginalGriff19-Nov-15 21:31
mveOriginalGriff19-Nov-15 21:31 
QuestionWriting HtmlHelper to Render all action methods Pin
roxcon18-Nov-15 17:53
roxcon18-Nov-15 17:53 
AnswerRe: Writing HtmlHelper to Render all action methods Pin
Dave Kreskowiak19-Nov-15 2:28
mveDave Kreskowiak19-Nov-15 2:28 
Questionsorting information from several threads - is my algorithm correct? Pin
John Torjo17-Nov-15 12:48
professionalJohn Torjo17-Nov-15 12:48 
AnswerRe: sorting information from several threads - is my algorithm correct? Pin
Matt T Heffron17-Nov-15 13:38
professionalMatt T Heffron17-Nov-15 13:38 
GeneralRe: sorting information from several threads - is my algorithm correct? Pin
John Torjo17-Nov-15 13:42
professionalJohn Torjo17-Nov-15 13:42 
QuestionRe: sorting information from several threads - is my algorithm correct? Pin
Matt T Heffron17-Nov-15 14:00
professionalMatt T Heffron17-Nov-15 14:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.