# .NET and More > ASP.NET And ASP.NET Core > VS 2019 Overriding CSS Class for Texbox with enabled='false'

## gigidisa

i am using Visual Studio 2019 with ASP.NET Framework 7.2, 
when i use textbox with enabled=false in my HTML during test Web page i found added code:

disabled=disabled and class=aspNetDisabled 

in my HTML, this code override my css class code.

I try to use WebControl.DisabledCssClass = mycss in vb.net code and also in Global.asax file,
 but during ReBuild code from VS2019 i receive this message:

error BC30456: DisabledCssClass is not member of System.Web.UI.WebControls.WebControl.

i have used Add Reference for System.web.dll but the error occur too.

what can i do? THANKS very much!

----------


## NeedSomeAnswers

Its not clear exactly what your trying to do, but..

If you just want your control to always be enabled why dont you just change your view and remove the disabled and class elements ?

If you want to change whether a textbox is enabled or disabled depending on conditions then you probably want to that using JavaScript !

If its something else then you need to tell us what your trying to achieve ?

----------


## gigidisa

I would simply like that for disabled textboxes my class defined in the html code was used, instead that class is replaced with an aspNetDisabled class when viewing the web page and that changes the font of the textbox and its size

I tried to use the command WebControl.DisabledCssClass = "myclass" to force my CSS class but during the build of the website I get the error that DisabledCssClass is not a member of System.Web.UI.WebControls.Webcontrol

----------


## NeedSomeAnswers

> disabled=disabled and class=aspNetDisabled


you should just be able to edit your view directly and add a class to your textbox. 

Can you post your textbox code from you view so I can see what your doing?

----------

