Last post Jan 04, 2006 05:38 AM by erdsah88
Jan 02, 2006 04:43 PM|erdsah88|LINK
Jan 02, 2006 07:23 PM|sbyard|LINK
A wide ranging question.
Are you generating the entire ASPX page on the fly, or dynamically creating controls within an existing web page?
You can create each UI dynamically quite easily using existing controls. Assuming you have enough meta data information, you can set max text lengths, allowed list items, etc. You can use Custom Web Controls as the main block
for these processes.
If you are doing something more off the wall, you might need to go to custom web controls, where you can write your own, or extend the existing controls quite easily. I have written a whole suite of customised controls that
implement certain interfaces to manage particular kinds of data (sorry this is a bit vague, but its commercially confidential at present).
Jan 02, 2006 09:51 PM|erdsah88|LINK
Jan 03, 2006 11:37 AM|sbyard|LINK
The problem you might run into is having to create a dynamic page at run time, that is, both the ASPX file and a supporting DLL from a graph. rather than approach the problem from some compllex technical viewpoint, lets aproach
this more simply in order to get an example going.
Start with just one table that has some columns - It doesn't matter what they are for now. It is a simple matter to get the data using a number of different data providers, whether in the ASPX or code files. We can get the
data as a data table, iterate the columns to get information about type, and then display as well edit, delete, or add new rows. Since the column details in the table tell us about the database table, this is a useful start for discussion.
The example below uses nothing fancy, it simply gets the information from any table you care to supply the name of, and displays the column names, type, and the first ten rows of data (uses a Northwind connection, but you could
use any database you want).
Have a look and think whether this simple approach might fulfil your needs
Page Language="C#" %>
Import Namespace="System.Data" %>
void Page_Load(object sender,
// get the data as a data table
DataView dv = ds.Select(new
DataTable dt = dv.ToTable();
// create an ASPX table to render
Table t =
// Add table header row of column types
TableHeaderRow thr =
foreach (DataColumn dc
TableHeaderCell thc =
thc.Text = dc.ColumnName + ". Type=" + dc.DataType.Name;
// add the data from the rows
foreach (DataRow dr
TableRow tr =
// add column data to the row
for (int index = 0; index < dt.Columns.Count; index++)
TableCell tc =
tc.Text = dr[index].ToString();
runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
SelectCommand="SELECT Top 10 * FROM [Products]"
Jan 03, 2006 04:39 PM|erdsah88|LINK
Jan 03, 2006 06:29 PM|sbyard|LINK
Most approaches will be fine for your needs
The one above is the simplest open approach and uses no special classes
If you want to design a process to to create your own classes, then the implementation can be simpler, but the code behind more complex.
Jan 04, 2006 05:38 AM|erdsah88|LINK