Question : How can I check when CType fails?

I use the folllowing code but it says that '<>' is not define for this type of object. How can I check to make sure that updateButton is not null before enabling it?  Thanks.
Code Snippet:
1:
2:
3:
4:
Dim updateButton As Button = CType(row.FindControl("btnUpdate"), System.Web.UI.WebControls.Button)
                If updateButton <> Nothing Then
                    updateButton.Enabled = True
                End If

Answer : How can I check when CType fails?

you don't need the parenthesis...i just place them there.
Random Solutions  
  •  Event with souce SidebySide when server starts
  •  Strange problem with tableAdapterManager.Update<wbr />All and related tables
  •  When contacting <a rel="nofollow" href="https://mail.domain.com/autodiscover/autodiscover.xml" target="_blank">https://mail.domain.com/au<wbr />todiscover<wbr />/autodisco<wbr />ver.xml</a> receiv
  •  How do I define a name using VBA that accomplishes the same as Insert|Name|Define
  •  Application.LoadFromText automation
  •  How do you tell visual studio to reindent all code so you can match up the "if/else" "while", and strucs like that
  •  SSRS Bigint Data Type Export Problem
  •  I have 3 PC's running Vista and I keep getting bowser errors about who is the master browser
  •  How do I add the YTD Column to this query in Access?
  •  RPC server unavailable on adding host to Cluster
  •  
    programming4us programming4us