Pages

Saturday 8 February 2014

How to Add an Icon to ASP.net Button

In aspx page with in the Style tags Add the Following Code

.MyButton
        {
            border: 2px solid #D2E1F4;
            border-radius: 10px;
            color: #04408C;
            font-weight: bold;
            padding: 5px 5px 5px 5px;
            background-image: url(plus.png);
            background-repeat: no-repeat;
            background-position-y: 5px;
            background-position-x: 10px;
            background-color: #e7e7e7;
        }

Now In the asp.net Button Add the Property cssClass="MyButton"

This is the Output you will get

No comments:

Post a Comment