Click here to Skip to main content
15,037,420 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi i really need help i m stuck in my final year project.
The main problem is i want to get the data from this link:
http://www.ise.com.pk/TradeScreen.asp
and Dump in database....
but if u check the course code there is no CLASS in the table.
so i cant use this below code to fetch the data:
SQL
where d.Name == "table" && d.Attributes["class"].Value == "Clase name"

So please help me out how can i get that data using c sharp and dump it in my database

[edit]Code block fixed and clickety[/edit]
Posted
Updated 23-Jun-13 13:08pm
v4

1 solution

You will have to use jquery and
loop through all < table>< tbody> and < tr>s inside that table..
fetch the data..
store data in a variables
read it from c#
dump it in your database.

here is an how it goes

XML
<table>
    <tbody>
        <tr>
            <td>
                Item1
            </td>
        </tr>
        <tr>
            <td>
                Value
            </td>
        </tr>
    </tbody>
</table>


here is the jquery


SQL
$('table > tbody  > tr').each(function() {...code...});


you can use td:first-child or td:nth-child(2) inside the abovefunction to select the < td>'s

hope this will help..

[edit]Format and Code block fixed[/edit]
   
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900