How do I concatenate 2 resource strings together in an aspx page

前端 未结 8 2141
日久生厌
日久生厌 2021-01-04 08:27

I have a localised ASP.net application (.net 2.0). I wish to concatenate 2 strings retrieved from the resource file together into one element, something like this.



        
8条回答
  •  礼貌的吻别
    2021-01-04 09:09

    < asp:HyperLink ToolTip='<%# "Some Text :" + Eval("id").ToString() %>' ....../>

    Do you mean something like this.... ToolTip='...' -> Convert your return values to STRING... ( xxxx.ToString() )

    Like this it displays: Some Text: 1234 --> on Tooltip

    so you should do something like this in your case: Text="<%$ (Resources:Resource, lw_name).ToString() %>" + <%$ (Resources:Resource, lw_required).ToString() %>"

    I don't know if it's going to work but try to conver to ToString().

提交回复
热议问题