Free Template: Two-Tenths
As always, you can do whatever you want with it. A mention and a link isn't necessary but is very much appreciated. :-)
As always, you can do whatever you want with it. A mention and a link isn't necessary but is very much appreciated. :-)
This is something I seem to be doing an awful as of late. I start out with some control (say a GridView), then switch to some other control (say a Repeater), but I don't want to delete the GridView control until I get the Repeater control working.
You might have tried commenting out the control the HTML way — i.e., <!--...--> — and you probably found out that ASP .NET engine still parses it. Until recently, I was dealing with this the hard way: cutting & pasting the control into Notepad.
No longer.
Namely:
<%--
<asp:GridView ID="ProductsGridView" runat="server" DataSource="ProductsDataSource">
</asp:GridView>
--%>
ASP .NET will ignore everything within a server comment block.
Feel free to do whatever you want with it as long as it doesn't involve making money off of it. As always, a mention and a link though not required is appreciated very much.
A Wordpress theme based on this template is forthcoming. So stay tuned.
Started out as a tutorial to make tables less boring via applying various formattings and ended up as a template instead. Enjoy. :-D
Suppose you're showing a list of customers, and you want to highlight any customer who'd been with you since before 1920. Maybe you also want the JoinedOn field to show the number of months for customers who've been with you for less than a year. It's fairly easy.######Add OnRowDataBound Handler to GridView
The easiest place to change the data is just after the data gets bound to the row. So:
<asp:GridView runat="server" ID="CustomerGrid" OnRowDataBound="CustomerGrid_OnRowDataBound">
</asp:GridView>
protected void CustomerGrid_OnRowDataBound(object sender, GridViewRowEventArgs e)
{
GridViewRow row = e.Row;
// Make sure we aren't in header/footer rows
if (row.DataItem == null)
{
return;
}
Customer customer = row.DataItem as Customer;
if (/* Do your conditionals here*/)
{
// Change Row formatting here OR
// Add new cells
// Or create an entirely different cells
}
}
<asp:BoundField DataField="CreatedOn" DataFormatString="{0:M/dd/yyyy}" HtmlEncode="false" />######Other Resources:
From Deviantart.












Wordpress Templated is, as you might have guessed from the screenshot, a little utility written to make your life better by making theme-creation easier.
For example, if you are anything like me, you can never remember the doctype specification for — wait for it — any doctype. Well, now you don't have to: simply type in "{Doctype type="Xhtml 1.0 Strict"}", click a button, and sit back and watch as you get the doctype url back. On second thought, don't sit back, because you'll surely get frustrated at having to come right back to an upright position. ;-)