I have the following problem, I have this code on a page:
<div class="modal-footer">
<asp:Button runat="server" ID="btnCancelar" Text="Cancelar" class="btn btn-sm btn-danger" data-dismiss="modal" Width="90px" />
<asp:Button runat="server" ID="btnSalvar" Text="Gravar" class="btn btn-sm btn-primary" ClientIDMode="Static" Width="90px" OnClick="btnSalvar_Click" />
</div>
This page loads in two moments, when I will add records and when I will consult. When I edit the page, these buttons must be disabled. So I run the code in the codebehind below:
btnSalvar.Enabled = false;
btnCancelar.Enabled = false;
so this HTML elements are rendered this way:
<div class="modal-footer">
<input type="submit" name="btnCancelar" value="Cancelar" id="btnCancelar" disabled="disabled" class="aspNetDisabled" data-dismiss="modal" style="width:90px;">
<input type="submit" name="btnSalvar" value="Gravar" id="btnSalvar" disabled="disabled" class="aspNetDisabled" style="width:90px;">
</div>
I know that Framework 4.0 defines this style sheet "aspNetDisabled" when an element is disabled, but the problem is that it is overwriting the bootstrap css, which formats the button layout.
Do you have any settings so you do not override style classes?