+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / How to get String.Format to work within User Profile widget template?

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

1 posts, 0 answered
  1. Alex
    Alex avatar
    1 posts
    Registered:
    18 Apr 2013
    07 Feb
    Link to this post

    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>

     

1 posts, 0 answered