Search blog.co.uk

  • GetPostBackControl

         Public Shared Function GetPostBackControl(ByVal page As Page) As Control
            Dim control As Control = Nothing

            Dim ctrlname As String = page.Request.Params.[Get]("__EVENTTARGET")
            If ctrlname IsNot Nothing AndAlso ctrlname <> String.Empty Then
                control = page.FindControl(ctrlname)
            Else
                For Each ctl As String In page.Request.Form
                    Dim c As Control = page.FindControl(ctl)
                    If TypeOf c Is System.Web.UI.WebControls.Button Then
                        control = c
                        Exit For
                    End If
                Next
            End If
            Return control
        End Function

    Many thanks to Ryan Farley (http://www.ryanfarley.com/blog/archive/2005/03/11/1886.aspx) for this code. I converted the C# to VB for my own project.  Saved my sanity it did!

  • England vs Brazil

    Not convinced by either side so far.

    But at least I'm sitting here writing this and watching the football on the laptop. Given that a new lease of life I have with upgrading the memory, I'd almost describe it now as zippy!! :D Shows how bad it must have been before...

  • Skype & Backgammon

    Downloaded the latest Skype today (version 3.0.0.217). It comes with some games included, one of which I played with Dave, Backgammon. Absolutely stuffed him I did, 2-0, before he had to "go to lunch". More like skulked off and licked his wounds....

  • Welcome

    Well this is a first for me, thanks to my friend Dave, I've started a blog.

    So be sure to stop by here for the regular updates...

About me
Friends (0)

The friend list is empty.

Footer:

The content of this website belongs to a private person, blog.co.uk is not responsible for the content of this website.