Search code examples
c#asp.netsql-server-2008user-controlsdynamic-data

Database-driven WebSite , Programatically render an html table with userControls


excuse my English as it's by far not my main one (:

I have a question which I would like to be advised on I'll try to be as specific as I can .

Allthogh it looks as if it's a long story it is only a practical question to help me deside:

which tools to use trying to achieve a comprehensive all in one solution, to be included in most/ majority of my future projects:

since my applications (my first "client"s demands) (...as i am still learning to develop via C# Dot.Net)

are data-driven + repeating itself almost with every task I need to fulfill.

i was thinking of a set : best practice tools ,to use... with a few main templates-like solutions , so :

form this List , what would be best? (easiest/simple to implement that will match html table)

having few options to select from (to interact with database)

ado.net Vs LINQ To SQL<<--- EOL/obsolete ?

datareader vs DataAdapter

List<Dictionary<string,Object> vs DataTable Dataset DataColumnCollection

..etc

Which set of Tools from listed ones(above or if i didn't mention any you could recommend) would you use ??

so with chosen methods ,i could do something like :

call StoredProcedureName :paramaters - take from DDL ID , DDL NAME

for/each row of DataBasetable ,

draw html Table that fits the dataType retrived from DB

<input type=text> for dates / nvarchar

<input type=checkBox> if its bit

apply vallidation if its money type: Append an event attribute onkeyPress="ValidationfucName(this)"


Solution

  • Try asp:GridView. You can widely configure it to your needs.