Click here to Skip to main content
15,889,034 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
when i type "fa fa-pencil-square-o" code it works fine
, but when i use like [__i class="@Model[i].Icon"__] the icon is disappearing when i inspect it is showing like "fanbspfa-pencil-square-o"

What I have tried:

Razor
@model List<muksab.models.aboutmodel>
@{
    Layout = null;
}
@for (int j = 0; j <= Model.Count(); j++)
{
    <div class="row">
        @for (int i = 0; i <= 3; i++)
        {
            if (j <= Model.Count())
            {
                <div class="col-lg-3 col-md-3 col-sm-6">
                    <div class="single-about-content">
                        <div class="icon round-border tran3s">
                            [__i class="@Model[i].Icon"__]
                        </div>
                        <h5><a href="#" class="tran3s">@Model[i].Services</a></h5>
                        <p>@Model[i].ServicesDescr</p>
                        <a href="#" class="more tran3s hvr-bounce-to-right">More Details</a>
                    </div>
                </div>

                j++;
            }
        }
    </div>
}
Posted
Updated 17-May-19 20:51pm
v5

Try

[__i class="@Html.Raw(Model[i].Icon)"__]
 
Share this answer
 
Comments
Merajuddin Ansari 17-May-19 5:50am    
i tried [__i class="@Html.Raw(Model[i].Icon)"__] , not working.from yesterday i am in problem please help me out.
it was the problem of copy past.when i type it is working fine but when i do copy past it is not working, i don't why.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900