Thu 28 June 2007 2:46 AM
Rock Dove
Give me 5 chants for a circle of protection oi oi oi oi oi It starts with the feet and ends with the beats Be carefully, it's not bad, you see. Walk with them over, Crooked to spake spitting with the devil bow. *nobody takes* Give me 5 chants for a circle of protection oi oi oi oi oi Cities overthrow Teach you not to know. What is this you have found in your depths? *never free* Cities overgrown Thought you might have known. Who is this? Just a fee or is there deaths? *non-violent* Give me 5 chants for a circle of protection OI OI OI OI OI *I don't believe in the god of vengeance* *nobody knows*
Mon 25 June 2007 7:28 PM
Funky Databinding to Control Properties
It's widely advertised that you can bind to any property of a control you'd care to. Getting it to actually work may be less than intuitive. This example binds the backcolor property of a label control based on color names stored in a database.
This ASPX code (note the Import statement at top of file):
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<form id="form1" runat="server">
<asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False"
DataKeyNames="HourAvailability" DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="HourAvailability" HeaderText="HourAvailability" ReadOnly="True"
SortExpression="HourAvailability" />
<asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
<asp:TemplateField HeaderText="DisplayColor" SortExpression="DisplayColor">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text=''>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" BackColor=''
Text=''>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString=""
SelectCommand="SELECT * FROM [TestingTable]">
</form>
</body>
</html>
Produces this table:
| HourAvailability | Description | DisplayColor |
|---|---|---|
| 0 | Unavailable | red |
| 1 | Can Work | yellow |
| 2 | Want to Work | green |
| 3 | Scheduled To Work | blue |
| 4 | Did Work | purple |
Wed 13 June 2007 10:27 AM
Johnny B. Goode
Christ, who didn't cover the song Johnny B. Goode?
Tue 12 June 2007 3:26 PM
Weird .NET Erros, Part 2
Ok, my prior success with deleting and re-publishing was a red herring. After "rebooting", I hadn't navigated to the correct page to exhibit the erro. The actual problem was that I had 2 different web pages that used the same name for their partial class. When I changed the name of the partial class for login_check.aspx so that it was no longer the same as the partial class name for schedule_interview.aspx, the errors went away.
I don't know why this wouldn't show up as an error in Visual Studio but the problem manifested as follows:
- Build > Build Website completes without error.
- Build > Publish Website completes without error.
- When you navigate to one of the problem pages, you get compile error BC30456: with an error message like 'Title' is not a member of aspfilename.aspx'
Tue 12 June 2007 1:16 PM
Weird .NET erros
Compiler error 'BC30456' in an ASP.NET page crops up in a deployed application that builds and runs fine in VS 2005. There's lots of noise on the net about this one, but no useful resolutions.
In my case, deleting the compiled files out of the deployed folder on the web server and re-deploying (sorry 'Publishing' in VS parlance) the web app cleared the erro.
My guess? Old compiled files were not properly deleted during the last publish causing some shit to go down. As usual when getting intermittent or seemingly random erros, "reboot" to fix.