I battle with this alot myself and am by no means a master of this, but I
can tell you some things that I know (also being an old ASP/VB programer
since 4.0 :) )
For attaching style sheets to a grid control, look around for the cssclass
command of the control (<asp:datagrid cssclass=<name>>). This will allow
you to get the look that you want by attaching CSS files to your grids.
If you really want to 'take it up a notch', think about using XML/XSL and
other related technologies to do your pages. If you get the huge MS-Press
book on XML they go through everything you need to know in there. But be
warned: it is not for the newbies and took me months to figure out how to
put it all together to build an app. Also, I am still having problems with
the XML techniques when it comes to the display of certain data in the grids
(ie. appostrofies in names and other special characters). Also, I found an
XML solution to be harder to support because of the extra levels that need
to be worked out, which adds complication to the app. The programmers that
I work with are less experienced than I am and they can never troublshoot
the XML stuff because it is too complex for them to follow. This creates
great job security, but also alot of headaches because I am the only one
that can work on certain apps.
I hope this helps. Maybe others have ideas too. All the best to you!
Scott
"darrel" <no*****@hotmail.com> wrote in message
news:Ok**************@TK2MSFTNGP12.phx.gbl...
I'm new to ASP in general. Have been doing a bunch of stuff using classic
ASP and a bit of stuff with ASP.NET (all with VBscript).
The .NET stuff i've been doing has been fairly simple...generating a
report from an Access table. The Datagrid along with some TemplateColumns seemed
to work well for that.
I'm not needing to now pull data from our Homemade CMS database to present
on our public site.
Datagrids and lists don't seem appropriate for this. They seem great for
whipping out quick data views, but seem really limited when it comes to
tweaking the display to include CSS, accessibility tags and attributes,
and formatting.
I need to spit out some content in this format:
[get the last 4 items from the newsitem table and use the template below]
<div class="newsitem">
<span class="date">[get the date and put it here]</span>
<h3>[get the date]</h3>
<p>[get the first 40 words]</p>
<p class="moreLink"><a>View More</a></p>
</div>
When I need something like this, are there any server controls I should
look at, or should I forget that and just go back to using inline ASP if/then
loops with a lot of response.write's to generate the wrapping HTML?
Actually, to simplify the question:
When should I use server controls vs. hand-rolled ASP templates?
-Darrel