Wednesday, February 18, 2015

stop highlight




{
    public partial class WebForm88 : System.Web.UI.Page
    {

        Color _disabledButtonBKColor = System.Drawing.Color.FromArgb(0x80, 0x80, 0x80);
        Color _enabledButtonBKColor = System.Drawing.Color.FromArgb(0xFF, 0xAD, 0x33);

        protected void Page_Load(object sender, EventArgs e)
        {
            EndEditButtonDisable();

        }

        private void EndEditButtonDisable()
        {
            btnShipmentSectionEndEdit.Enabled = false;
            btnShipmentSectionEndEdit.BackColor = _disabledButtonBKColor;

            //I am fire this class for not hover action because I need to same GRAY color (It is disable)

            //btnShipmentSectionEdit.CssClass = "yellow";
        }



        protected void btnShipmentSectionEdit_Click(object sender, EventArgs e)
        {
            btnShipmentSectionEdit.Enabled = false;
            btnShipmentSectionEdit.BackColor = _disabledButtonBKColor;

            btnShipmentSectionEndEdit.Enabled = true;
            btnShipmentSectionEndEdit.BackColor = _enabledButtonBKColor;

          
        }

        protected void btnShipmentSectionEndEdit_Click(object sender, EventArgs e)
        {
            EndEditButtonDisable();

            btnShipmentSectionEdit.Enabled = true;
            btnShipmentSectionEdit.BackColor = _enabledButtonBKColor;
        }
    }
}


body
{
    background: none repeat scroll 0 0 #FFF; /*overflow-x: hidden;*/
    margin: 0;
    padding: 0;
    /*font-family:Futura, Arial, sans-serif;*/
    font-family:Segoe UI, Verdana, Arial;
    font-style: normal;
    font-size: 12px;
}


.buttonClass [type="submit"]
{
    background-color:  #FFAD33;
    border:1px solid #FFAD33;
    border-radius: 5px;
    padding: 6px 12px;
    font-size: 100%;
    color: #fff;
    cursor: pointer;
    transition: background .3s;
    -webkit-transition: background .3s;
    position: inherit;
    text-align: center;
    width: auto;
    vertical-align: central;   
}

.buttonClass input.aspNetDisabled
{
    background: #808080;
    color:#FFF !important;
    border:1px solid #808080;
}
.buttonClass input.aspNetDisabled:hover
{
    background: #808080 !important;
    color:#FFF !important;
    border:1px solid #808080 !important;
}

.buttonClass input:hover
{
    background:#FFF !important;
    color:#FFAD33 !important;
    border:1px solid #FFAD33 !important;
}



/****************** Disable button *****************************************/
      
/*
 input[type="submit"].notHover,
 input[type="submit"].notHover:hover {
            background: initial !important;
            color: initial !important;
        }

*/
       
  <   div class   =     "       buttonClass       "     >


            < asp :Button  ID = "btnShipmentSectionEdit" runat="server" Text="Edit" Enabled="true"


                OnClick="btnShipmentSectionEdit_Click" />


            < asp : Button  ID = " btnShipmentSectionEndEdit" runat="server" Text="End Edit" Enabled="false"

                OnClick="btnShipmentSectionEndEdit_Click" />
       


No comments: