Inside TemplateField under ItemTemplate we added a Checkbox. The CheckBox can be dynamically enabled and disabled in GridView in the following two ways. jQuery | Hide/Show, Toggle and Fading methods with Examples. This article will illustrate how to perform Form Validation for TextBox INPUTS for validating Name, Email Address and Age, etc. In typescript, add that function. If the ViewBag.HasPassport variable has value True, then the TextBox is enabled else the TextBox is disabled by setting the disabled Attribute. Ask Question Asked 7 years, 9 .