I learned .NET via the compulsory texts and resources. Almost all of them spend all of their time using rich data controls to display and work with data. I'm in a job situation now where this is being discouraged. Could someone provide some examples or suggest some resources for doing it in a less "lazy" way? I think the reason for this transition is because we will be going MVC down the road. Still writing with web forms however. Thanks all.
Asked
Active
Viewed 372 times
0
-
I'm unfamiliar with rich data controls; could you link to a resource listing them? – jwheron Jan 10 '12 at 20:39
-
If I understand you correctly, you mean a list of the controls? Gridview, Formview, Listview, Detailsview. Is this what you mean? – John Kinane Jan 10 '12 at 20:56
-
Ah, so that's what you're talking about. I hadn't heard them referred to as "rich data controls". On that note: does the Repeater control fall into the same construct? – jwheron Jan 10 '12 at 20:59
-
I don't believe so. Just the controls that use abstraction and ViewState – John Kinane Jan 10 '12 at 21:24
-
1I don't have resources handy, but I've done a good bit of work with the `Repeater` control. What sort of resources are you looking for? Examples where something like a `Repeater` replaces a `GridView`? – jwheron Jan 11 '12 at 15:14
3 Answers
0
Just get familiar with HTML, CSS, javascript and jQuery, they should be all you need to develop websites where you have the most control on what's being rendered and how it's being rendered.
P.S.: I use .NET MVC for web development at my current job

Bassam Mehanni
- 14,796
- 2
- 33
- 41
-
Thanks. I use all of that everyday however. What I'm looking for is alternative approaches to using the data controls. – John Kinane Jan 11 '12 at 13:03
0
My boss showed me what I was looking for.
<asp:Panel ID="ProcPanel" runat="server" />
Code behind
ProcPanel.Controls.Add(new LiteralControl("<table><thead><tr>"));
//loop labels here
ProcPanel.Controls.Add(new LiteralControl("</thead>"));
ProcPanel.Controls.Add(new LiteralControl("</tr></table>"));
Why do it this way instead of using Gridview or others? Less abstraction, lighter load.
Thanks all.

John Kinane
- 366
- 2
- 8
- 17
-
That's probably not the way I'd handle this particular situation. A repeater that builds the table would probably make more sense – Prescott Jan 11 '12 at 15:33
-
I'm not disagreeing with you but could you elaborate more? I'm interested in knowing all points of view. – John Kinane Jan 11 '12 at 17:05
-1
This is a more complete working solution.
ProcPanel.Controls.Add(new LiteralControl("<table><tr>"));
DataSet lblSet = getBlendInfo.GetProcessLabels(Equip_ID);
StringBuilder tblString = new StringBuilder("");
foreach (DataRow dRow in lblSet.Tables[0].Rows)
{
tblString.Append("<td>");
tblString.Append(dRow["Input_Column_Caption"].ToString());
tblString.Append("</td>");
}
ProcPanel.Controls.Add(new LiteralControl(tblString.ToString()));
ProcPanel.Controls.Add(new LiteralControl("</tr></table>"));

John Kinane
- 366
- 2
- 8
- 17