Pinku

Pinku

  • 1.4k
  • 308
  • 46.6k

How to change css class in code behind in vb.net

Jun 3 2020 2:48 AM
<div id="test" class="search-bar-inner-container">
 
i need to change this class="search-bar-inner-container"  for id 'test'  in code behind of vb.net file
so i tried like below
Protected test As As HtmlControls.HtmlGenericControl
 
test.Attributes.Add("class", "search-bar-inner-container1") 
 
but its showing null error 
 

Answers (1)