CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2009
    Posts
    15

    Html and Aspx in C# Form

    I want to take some exchange rate informations from some web pages. There are the exchange rate in these pages.
    For example;

    http://www.tcmb.gov.tr/kurlar/today.html
    (I want to take from first character to the last of some lines in the page)


    http://themoneyconverter.com/TRY/PLN.aspx

    (I want to take from a character to other one of some lines in the page.)

    And then I will save them in datagrid.

    How can I do this?

    Thanks for your helping.

    Best regards.

  2. #2
    Join Date
    Oct 2008
    Location
    Cologne, Germany
    Posts
    756

    Re: Html and Aspx in C# Form

    i would get the <pre>'s content and write a regular expression for the lines with exchange rates.
    win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming

    remeber to give feedback you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation

    private lessons are not an option so please don't ask for help in private, I won't replay

    if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know

  3. #3
    Join Date
    Sep 2009
    Posts
    15

    Re: Html and Aspx in C# Form


  4. #4
    Join Date
    Oct 2008
    Location
    Cologne, Germany
    Posts
    756

    Re: Html and Aspx in C# Form

    the first website is easy to parse. the second one i guess too, but you have to look at the source code and extract the part that you need.
    win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming

    remeber to give feedback you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation

    private lessons are not an option so please don't ask for help in private, I won't replay

    if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know

  5. #5
    Join Date
    Sep 2009
    Posts
    15

    Re: Html and Aspx in C# Form

    ok,so how is the first website's parse code.Maybe, i should to find another link for the second website.

  6. #6
    Join Date
    Oct 2008
    Location
    Cologne, Germany
    Posts
    756

    Re: Html and Aspx in C# Form

    i think my first question should have been whether you know regular expressions?
    win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming

    remeber to give feedback you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation

    private lessons are not an option so please don't ask for help in private, I won't replay

    if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know

  7. #7
    Join Date
    Sep 2009
    Posts
    15

    Re: Html and Aspx in C# Form

    I could'n so much what do you mean? please explain it more Thanks.

    i don't know ,if you say html source expressions.

  8. #8
    Join Date
    Nov 2009
    Location
    .net 3.5 csharp 2008 developer
    Posts
    36

    Re: Html and Aspx in C# Form

    By regular expressions I think he means the Regex class.

    It can be used to parse specific data out of a string, for example the HTML source code for those pages you are interested in.

    Unfortunately, I find the regex pattern syntax very confusing so I cannot help you there.

  9. #9
    Join Date
    Oct 2008
    Location
    Cologne, Germany
    Posts
    756

    Re: Html and Aspx in C# Form

    you mean this:
    USD/TRY 1 ABD DOLARI 1.5012 1.5084 1.5001 1.5107
    and this:
    Conversion Rate (Buy/Sell):
    PLN/TRY = 1.90326

    ??
    which column from the first website?

    what do you need exacly? only the number? i guess you've got the rest of the programm already, like downloading the content of the webpage etc.?
    win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming

    remeber to give feedback you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation

    private lessons are not an option so please don't ask for help in private, I won't replay

    if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know

  10. #10
    Join Date
    Sep 2009
    Posts
    15

    Re: Html and Aspx in C# Form

    I mean this,from the first website

    USD/TRY 1 ABD DOLARI 1.5031 1.5103 1.5020 1.5126
    AUD/TRY 1 AVUSTRALYA DOLARI 1.3608 1.3697 1.3545 1.3779
    DKK/TRY 1 DANİMARKA KRONU 0.29374 0.29519 0.29353 0.29587
    EUR/TRY 1 EURO 2.1864 2.1969 2.1849 2.2002
    GBP/TRY 1 İNGİLİZ STERLİNİ 2.4402 2.4530 2.4385 2.4567

    and from the second website

    PLN/TRY = 1.90109

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured