2012-11-27 3 views
1

루피 기호를 표시하려고합니다. ₹ 코드 : & # 8377; 내 앵커 태그에.C# razor 앵커 태그 텍스트의 html 코드

나는 몇 가지를 시도했지만 아무것도 난 당신이 Html.ActionLink 함께 할 수있는 확실하지 않다

 @{ string _text = 
       String.Format("{0} {1} {2} {3} {4}", 
       @Html.DisplayFor(model => model.NoOfBedrooms), 
       "bedroom flat", 
       @Html.DisplayFor(model => model.TransactionTypeDescription), 
       @Html.Raw(₹), 
       @Html.DisplayFor(model => model.Price)); 

      string _rental = ""; 
      if (Model.TransactionType == 2) { _rental = " per month"; } else { _rental = ""; }; 

      string _linkText = _text + _rental; 
     } 



@Html.ActionLink(_linkText, "Details", "Property", new { id = Model.PropertyId }, null) 

답변

1

도와주세요 ... 작동하지 않습니다,하지만 당신은 항상 <a href='@Url.Action("Index")'>@Html.Raw("&#8377")</a>를 사용하여 수동으로 구성 할 수 있습니다.


@{ string _text = 
      String.Format("{0} {1} {2} {3} {4}", 
      @Html.DisplayFor(model => model.NoOfBedrooms), 
      "bedroom flat", 
      @Html.DisplayFor(model => model.TransactionTypeDescription), 
      "&#8377;", 
      @Html.DisplayFor(model => model.Price)); 

     string _rental = ""; 
     if (Model.TransactionType == 2) { _rental = " per month"; } else { _rental = ""; }; 

     string _linkText = _text + _rental; 
    } 

<a href='@Url.Action("Details", "Property", new { id = Model.PropertyId })'> 
    @Html.Raw(_linkText) 
</a> 
+0

나중에, 난 그냥 그것의 가능한 행동의 링크를 만들 경우 저장소로 .. HTML로 렌더링됩니다 코드를 확인하고 싶어서 ... 수동으로 만들어 결국 – Tripping