How to set css style to asp.net button? How to set css style to asp.net button? asp.net asp.net

How to set css style to asp.net button?


You can assign a class to your ASP.NET Button and then apply the desired style to it.

<asp:Button class="mybtn" Text="Button" runat="server"></asp:Button>

CSS:

.mybtn{   border:1px solid Red;   //some more styles}


I Found the coding...

 input[type="submit"]    {     //css coding    } input[type="submit"]:Hover      {     //css coding    }

This is the solution for my issue.....Thanks everyone for the valuable answers.......


You can use CssClass attribute and pass a value as a css class name

<asp:Button CssClass="button" Text="Submit" runat="server"></asp:Button>` .button{     //write more styles}