How to get String.Format to work within User Profile widget

Posted by Community Admin on 04-Aug-2018 00:18

How to get String.Format to work within User Profile widget template?

All Replies

Posted by Community Admin on 07-Feb-2017 00:00

I am developing a widget template for our user profile control in SF 6.1. When I try to use String.Format to display FirstName and LastName together, I get nothing displayed on the web when I run it. I have tried using sf:TextField as well as just asp:labels with the same Evals, nothing seems to work.

Is there an easy way to do this? Here is the code I'm attempting to use:

 <div class="blog-author-name">
                        <sf:TextField ID="txtName" runat="server" DisplayMode="Read" Value='<%# String.Format("0 1", Eval("FirstName"),Eval("LastName"))%>' />
                    
                    </div>

 

This thread is closed