Archive for April, 2007

parla italiano?

Monday, April 30th, 2007

A couple of years ago, Gir and I were thinking of holidaying in Florence/Rome, and though we never went, I’m still keen on going at some point, and me hating the thought of not being able to understand the language at all, have decided to swot up.

This may well turn out to be one of those personal projects that never get finished, but a week ago, I bought a “teach yourself beginners Italian” book and accompanying CD and have since been plugged in at every opportunity. So far, I’m absorbing it quite well, and having mastered the essential cheating-man’s phrase, “parla englese?” I have reached unit four, which introduces adjectives, likes, dislikes, preferences and numbers over 20. I’m quite enjoying the learning experience right now; if it lasts, there’ll be another update when I’ve got to the milestone of unit 10.

more asp:updatepanel fun - dynamic triggers

Friday, April 20th, 2007

Another post for my own future reference, and maybe it’ll help someone else when google comes by. I spent a very long time looking for the answer.

I have a DropDownList, and when value 999 is selected I want the Textbox in my UpdatePanel to become visible. Worked a charm with this:

<Triggers>
  <asp:AsyncPostBackTrigger ControlID="dropList" EventName="SelectedIndexChanged" />
</Triggers>

But, for reasons I won’t go into, I needed to dynamically declare the trigger in code. So, what I have finally come to is this:

Sub page_load()
  ScriptManager1.RegisterAsyncPostBackControl(dropList)
  If Not IsPostBack Then
    Dim trigger As New UI.AsyncPostBackTrigger
    trigger.ControlID = dropList.UniqueID.ToString
    trigger.EventName = "SelectedIndexChanged"
    UpdatePanel1.Triggers.Add(trigger)           
  End If
End Sub

Sub dropDeptsAreas_SelectedIndexChanged(ByVal s As Object, ByVal e As EventArgs)     
  If s.SelectedValue = "999" Then
    txtNewbox.Visible = True
  Else
    txtNewbox.Visible = False
  End If       
  UpdatePanel1.Update()   
End Sub

Hurrah. The bit I was missing was RegisterAsynchPostBackControl.

wii bowling

Monday, April 16th, 2007

So, on Friday after work, Gir brought home our Wii. We had half an hour before we would need to get out the house again for the evening’s boozing, so we had a quick game of bowling. This is the first time I’ve ever played Wii, and this is the score sheet from that first game. Honestly.

At frame 5, I was feeling the pressure and crumbled mid-game, but otherwise I can’t help but feel a bit smug. Not bad for my first go.

Wii bowling score sheet. Lesley scores 161 (5 strikes, one spare)

rarr!

Thursday, April 12th, 2007

Just had to look up the HTML character entity for a right arrow → which pleasingly is &rarr;. I’ll not forget that one in a hurry.

Also very memorable is &there4; for the therefore symbol ∴ though I doubt I’d ever need to use that in real life.

When will they introduce smiley characters into the specification? That would be so cool.

‘sys’ is undefined

Wednesday, April 11th, 2007

There’s a lot of blogging and forum posting about this error, but I wanted to make a note-to-self about what fixed it for me, for future reference.

From C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\web.config grab the <httpHandlers> block and stick it inside <system.web>