Thursday, April 14, 2011

How to retrieve data from the html table?

Hi, I will generate html table dynamically with some textbox and dropdownlist, user will enter their input in that. How to read these data in the controller?(MVC)

From stackoverflow
  • Hi Krish,

    There is a relatively quick and easy way to get data from a well-formatted HTML table using the Microsoft .NET Framework Data Provider for OLE DB. Essentially, this allows you to specifiy a connection string which points at the page with your HTML table on it.

    Here's an example connection string:

    *Provider=Microsoft.Jet.OLEDB.4.0;Data Source=http://www.your_web_address.com/yourHTMLTablePage.htm;Extended Properties="HTML Import;HDR=YES;IMEX=1"*

    You can the use the OleDbConnection and OleDbCommand objects to get to the data contained within the table. You can find these inside the namespace: System.Data.OleDb

    I hope this helps?

    /Richard.

  • This will generate 5 textboxes, i want to read the data entered in these text boxes when i click submit button.

    Thanks in advance

0 comments:

Post a Comment