Font awesome inside asp button

前端 未结 7 2083
别那么骄傲
别那么骄傲 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:36

    You can't with the default asp.net button you will need to use a HTML button and give it runat=server attribute:

    
    

    So use code behind with this you add:

    onserverclick="functionName" 
    

    To the button, then in your C# do:

    protected void functionName(object sender, EventArgs e)
    {
        Response.Write("Hello World!!!");
    }
    

    So final button looks like:

    
    

提交回复
热议问题