ASP.NET Find Control by ID

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Syntax

  1. control.FindControl("Id Of The Control To Be Found")

Remarks

  • FindControl is not recursive, it only searches through immediate children of the control
  • There is an overload FindControl(String, int) which is not indented for public usage
  • If nothing is found, FindControl returns null, so this is often a good idea to verify result for being not null


Got any ASP.NET Question?