title: Displaying and updating an HTML table with ASP.NET
body: <p>So, I am pretty new to web programming and I just understand the basic syntax, not too many advanced features or anything. Also, I really don't have any experience with Javascript, but again I pretty much understand the syntax and general programming knowledge from my experience with C++, so I can probably figure it out.</p>
  
  <p>Here's what I'm looking to do. I have a web service that returns a DataSet variable/array/data structure. Since this is a .NET type, I figured it would be easiest to access this service with ASP.NET as well. I can read the data in from the web service and display individual elements by specifying table, row, and column, so I know the data is there. However, I want to display the results in a table. I did get this to work(I don't have the code with me right now, however) but only when the page first loads. The web service method I am accessing performs a SQL query, and I want to be able to type in the query string into a text box, submit that to the server, and have it update/populate/create a table. I'm sure this is very simple, but like I said I'm just really new to web programming. </p>
  
  <p>I remember seeing a page on w3's tutorial site that used the "Web Pages" syntax inside an HTML table, and used a foreach loop to iterate through, create the new rows, input the data, etc. I understood that, but I'm not sure how to accomplish something similar with the "Web Forms" type of project(I'm stuck using visual studio or notepad++ since I'm doing this on my work PC, and I think the .cshtml files use a different editor)</p>
  
  <p>I'm thinking either some form of inline code, or modifying an HTML element from the C# code (within the codebehind file) or using inline code within the HTML element itself. I'm not exactly sure how to write an event handler in ASP.NET, can you use an HTML form/button to call an ASP.NET function(again, which is within the codebehind file)? Also, sorry if something similar has been asked, I'm going a little crazy since I've just learned all this web dev stuff over the last week! Btw, can someone explain what happens to the ASP.NET elements when they are returned to the browser? Does the server basically convert them into basic HTML elements? The application I am working on will be used on mobile devices so it needs to be as simple as possible on the client side. </p>
  
  <p>Thank you.</p>