I'd like some guidance on the approach I'm taking to creating an ASP.NET Web Application.
The application (in the .aspx.cs file) is designed to look in a directory at a set of text files. For each text file I would like to create/amend a table in my .aspx file using information from the text file.
So far I have created asp:Table controls with ID attributes. I then build up a table in my .aspx.cs file using TableRow & TableCell methods and add them to the table using the ID attribute.
This has all gone well and is all hard coded in. I have begun unpicking it and creating a for loop to loop through the directory looking for text files. It then grabs the textfile name and I would like to use that to amend an asp:table control with the same name. However I cannot call the same table methods on the textfile name since it is a string.
So finally my question is, is this the right approach? Do I hard code asp:table controls in my .aspx file of tables I will know the names of (the textfile names) and then try and update them using the C# behind code? If so is it just a case of creating an instance of a table in C# using the textfile name which will bind it to the asp:table control?
Sorry if this is very convoluted - first time using asp.net today.