Font awesome inside asp button

前端 未结 7 1964
别那么骄傲
别那么骄傲 2020-12-01 05:56

This is my asp:button code which is not rendering font awesome\'s icon but instead shows the HTML as it is:

  

        
相关标签:
7条回答
  • 2020-12-01 06:55

    You can also try this solution -

    <span  style="position:relative;">
        <i class="fa fa-hand-o-down"></i>
        <asp:Button ID="btnCatMoveDown" CssClass="movedown" CausesValidation="false" Text="" CommandName="categorymovedown" CommandArgument='<%#Eval("SomeId")%>' runat="server"></asp:Button>
    </span>
    
    <style>
        .movedown {
            position:absolute;
            opacity:0;
            top:0;
            left:0;
            width:100%;
            height:100%;
        }
    </style>
    
    0 讨论(0)
提交回复
热议问题