Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7883027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:25:33+00:00 2026-06-03T04:25:33+00:00

I have been using Bootstrap for a while now and love it. Saves me

  • 0

I have been using Bootstrap for a while now and love it. Saves me a bunch of time. I just started with KnockoutJS and as it happens, I have to combine the two at a rather granular level. My Knockout object(s) are filling a results table. When I just want the values (like Name) it is working great. However, I want to put an icon (icon-pencil for you Bootstrap people) in front of my link so it stands out as something to edit. I am using ASP.Net (not MVC) but I suspect that is not an issue.

Here is some code that works (but has no icon):

<asp:LinkButton ID="lbtEditGenerator" runat="server" data-bind="text: GeneratorName, click: function() { EditGeneratorClick(GeneratorID) }"></asp:LinkButton>

However, I want to add the following code just in front of the “GeneratorName” to get me the pencil icon. I need it to be within the text property so it is part of the LinkButton:

<i class='icon-pencil'></i>

Combining them in the bind-data (as follows) throws a parsing error:

<asp:LinkButton ID="lbtEditGenerator" runat="server" data-bind="text: <i class='icon-pencil'></i> GeneratorName, click: function() { EditGeneratorClick(GeneratorID) }"></asp:LinkButton>

Aside from creating a new property on my object that combines the two values, is there a way to do this with the Knockout binding?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:25:35+00:00Added an answer on June 3, 2026 at 4:25 am

    Have you tried something along these lines:

    <asp:LinkButton ID="lbtEditGenerator" runat="server" click: function() { EditGeneratorClick(GeneratorID) }">
        <i class='icon-pencil'></i>
        <span data-bind="text: GeneratorName"></span>
    </asp:LinkButton>
    

    Alternatively, you can put the <i> element before the <asp:LinkButton>. The solution above allows you to click either on the icon or on the text to trigger the button.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using the CodeIgniter system for a while now - but it
I have been using this script for a while and suddenly it just stopped
I have been using Zend Framework for a while now. I am having an
I have been using the Twitter Bootstrap to build the base layout for a
I have been using WPF for a few years now and don't have any
I have been using Weblogic as my company used it. Now I want to
I have been using attachment_fu on a project for a long time and all
I have been using the less-rails-bootstrap gem from https://github.com/metaskills/less-rails-bootstrap in my rails 3.1 project.
I have been using Dojo hosted on Google's CDN. I just downloaded the development
I have been using HTML4 for quite some time. I've heard of HTML5 for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.