I have to perform some changes to your code, first of all I have changed it to VB and added it inside of INIT event, just like this:
Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Dim mddlCategory As DropDownList = Me.Master.FindControl("ddlCategory") mddlCategoria.Visible = False End Sub